Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
I have an Archive in my site that is shown as:

<h4>Archives</h4>
<ul>
<cms:archives masterpage='newstemplate.php' type='yearly' order='desc'>
<cms:archives type='yearly' start_on=k_archive_date stop_before=k_next_archive_date order='asc'>
<a href="<cms:show k_archive_link />"><cms:date k_archive_date format='Y' /></a><br />
</cms:archives>
<cms:archives type='monthly' start_on=k_archive_date stop_before=k_next_archive_date order='asc'>
- <a href="<cms:show k_archive_link />"><cms:date k_archive_date format='F' /></a><br />
</cms:archives>
</cms:archives>
</ul>

Which means the year part is clickable which will show up all the entries for the year. Further to it the user can filter through months as well. What I am looking for is to show the Archive as a nested view based on Year and Month. This will make it look like a menu. I read the nested view in Couch and from what I understand this can be implemented in clonable pages and not just on the Archive. Please advice
Sarah,
You were almost there.

Please try out the following code -
Code: Select all
<cms:archives type='yearly' order='desc'>
    <a href="<cms:show k_archive_link />"><cms:date k_archive_date format='Y' /></a><br />
   
    <cms:archives type='monthly' start_on=k_archive_date stop_before=k_next_archive_date order='asc'>
        - <a href="<cms:show k_archive_link />"><cms:date k_archive_date format='F' /></a><br />
    </cms:archives>
   
</cms:archives>

It will show you the years with the months nested below.
If required, use the 'masterpage' attribute with *both* the cms:archives loop.

Hope this helps.
Thanks for the reply. I have this part working. what I was looking for was a folder view of the Archive grouped by year. Can a folder view work here? Can you help me how to go about it
I think what you are looking for is the 'archive-view'.

Please take a look at the following for details
http://www.couchcms.com/docs/concepts/l ... pages.html

Basically, the links outputted by the cms:archives tag lead automatically to an archive-view. We simply have to use the 'k_archive_date' and the 'k_next_archive_date' as follows to constrain listing to the archive period.
Code: Select all
<cms:pages start_on=k_archive_date stop_before=k_next_archive_date >
        <!-- All the variables of each page belonging to this archive period are available here -->
</cms:pages>

Does this help?
4 posts Page 1 of 1
cron