Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
:oops: I hope this isn't a daft question: is it possible to know when in page view if it is also archive view? I've been cms:dump'ing and getting a bit confused over this (first time I'm dipping in to folders/archives etc Thanks ...
Hi,

It is described in detail (I hope :) ) here -
http://www.couchcms.com/docs/concepts/views.html
http://www.couchcms.com/docs/concepts/v ... views.html

I am quoting a snippet taken from the documentation that can be used to find the view a page is being visited in -
Code: Select all
<cms:if k_is_page >
        <!-- Page view - display current page here -->
<cms:else />
        <!-- List view -->
        <cms:if k_is_folder >
         <!-- Folder view - display a list of pages belonging to this folder here -->
        </cms:if>

        <cms:if k_is_archive >
            <!-- Archive view- display a list of pages belonging to this time period here -->
        </cms:if>

        <cms:if k_is_home >
            <!-- Neither a folder view nor archive view - display a list of ALL pages cloned from this template here  -->
        </cms:if>
</cms:if>

Do let me know if there is something that confuses you.
Thanks.
thanks ... my aim was to not display a link to purchase a ticket for an event when looking at an event detail page (page view) via the archive navigation. So I wrongly thought I would be able to know if we had arrived at the page via the archive navigation. It was simple really, just check if the event date is earlier than 'today' and then don't display the ticketing info! Sometimes a simple answer is hard to find!
3 posts Page 1 of 1