Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
Okay little confused really..

Bare with me, just wanting to ensure i'm doing this correctly.

I have a section called ''News'' - We show 8 most resent news posts on the main home page. However when you go into the news page we show all the news, now i want to split them somewhat.

I want away to show the news in sections, as we cover various different things.

Here is the list of what folders we want within the news section.

GP2
GP3
DRIFTING
RALLYCROSS
BTCC
SHOWS
EVENTS

So i just want sub folders, of the above. This is how i think it should be done.

Code: Select all
<cms:folder name="gp2" title="GP2 News" />
<cms:folder name="gp3" title="GP3 News" />
<cms:folder name="drifting" title="drifting" />
<cms:folder name="rallycross" title="Rally Cross" />
<cms:folder name="shows" title="Shows" />
<cms:folder name="events" title="Events" />


Now what i want todo is on the news_list page i want to show all the news, however at the top i want the links to the folders, so

GP2 | GP3 | Drifting | RallyCross | Shows | Events

Showing the folders, and linking them like this?

Code: Select all
<a href="<cms:show k_folder_link/>"><cms:show k_folder_title/></a>


So now i have the folders, and the links at the top, when they click GP2 will this only show GP2?
Hi Simon,

Your question has two parts -
1. How to to create links to the folders.
Ans: Either use tags like cms:folders, cms:listfolders
or create the links manually using cms:link e.g.
<a href="<cms:link masterpage='news.php' folder='drifting' />" >Drifting</a>

2. How to list pages within a particular folder.
Ans: The links above will lead the use to the 'folder-view' of the template (news_list in your case). The cms:pages tag can be used to list pages belonging to the folder being accessed.
<cms:pages masterpage='news.php' folder=k_folder_name>
..
</cms:pages>

Hope this helps.
Big thanks for the reply KK.

I'm having some problems.

Code: Select all
<cms:folder name="gp2" title="GP2 News" />
<cms:folder name="gp3" title="GP3 News" />
<cms:folder name="drifting" title="drifting" />
<cms:folder name="rallycross" title="Rally Cross" />
<cms:folder name="shows" title="Shows" />
<cms:folder name="events" title="Events" />


Code: Select all
<cms:template title='test' clonable='1' commentable='1' dynamic_folders='1'>


However in couch No folders defined

Is this because Pretty URLs are not turned on?
Please turn off dynamic folders.
Once you use dynamic folders, Couch ignores the fixed cms:folder tags.
edit
All done KK,

Big thanks for you're support :D
6 posts Page 1 of 1