Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
I have 4 folders/categories and I've set up my folder view thusly:

Code: Select all
<cms:folders masterpage='news.php' >
<li><a href="<cms:show k_folder_link />" title="Posts in the <cms:show k_folder_title /> category"><cms:show k_folder_title /></a></li>
</cms:folders>


This outputs a list of my folders:
[*]Announcements
[*]News
[*]Reunions
[*]Scholarships

With links to each, like so: http://localhost/rhs/news.php?f=3, http://localhost/rhs/news.php?f=2, etc.

However, clicking any of those links returns ALL the items from all 4 categories, instead of just those in the matching folder.

Can't figure out what I've done wrong. Any ideas?

TIA ... Joe
Hi,

The links you mentioned (http://localhost/rhs/news.php?f=3, http://localhost/rhs/news.php?f=2, etc.), when clicked, will take the user to the, so called, 'folder-view'. As mentioned in the docs (https://docs.couchcms.com/concepts/views.html), your code should now recognize this view and handle it accordingly.

The usual handling of the folder-view simply consists of listing only the pages belonging to that particular folder (as in your case). For that, the <cms:pages>'s 'folder' parameter needs to be set with the correct value. Please see the following for complete examples -
https://docs.couchcms.com/concepts/listing-pages.html

I think the two above mentioned links should help you in solving the problem.
Thanks KK. After re-reading those topics more carefully, I figure out what I was doing wrong.

- Joe
3 posts Page 1 of 1
cron