Newer
Older
DocumentLibrary / src / DocumentLibrary / instance / methods / show_hide_topics
<dtml-comment>
show_hide_topics method

    Toggles a cookie flag to indicate whether empty topics are shown.
    To enable this feature, set the hide_empty_topics property of the
    document library object to true.

    Author: Casey Duncan (casey_duncan@yahoo.com)

</dtml-comment>

<dtml-if expr="REQUEST.cookies.has_key('show_all_topics')">
    <dtml-call expr="RESPONSE.setCookie('show_all_topics', '', path='/', 
                                        expires=_.str((ZopeTime()-1).rfc822()))">
<dtml-else>
    <dtml-call expr="RESPONSE.setCookie('show_all_topics', '1', path='/')">    
</dtml-if>

<dtml-call expr="RESPONSE.redirect(URL1)">