Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi there.

I'm currently working on my first CouchCMS based website. It is working excellent so far. :) There is just one problem I need to work out.

I'm currently working on the portfolio section. Every item in there has it's own page (?p=n) and the portfolio.php file is showing a list with the entire portfolio, as well as the last 5 items in there. Here's the deal:

The right column, containing my last 5 projects, is automatically ordering by date. That's good. However, I want the left column, containing the entire portfolio, to order by the page names (which means alphabetically) or completely random. Any built-in to do this?

Thanks in advance!

Johan
Sincerely,
Johan

Brightsites
Webdesign, webdevelopment, webapplications, hosting, advice and more.
Hi Johan and welcome to our forum.

Replying to your query - you can use the orderby parameter of the cms:pages tag to order the pages by any of the following attributes -
* publish_date (default)
* page_name
* page_title
* modification_date
* comments_count

In your case, you could use e.g.
<cms:pages masterpage='portfolio.php' orderby='page_name'>
...
</cms:pages>

You can find more about the parameters accepted by pages tag at http://www.couchcms.com/docs/tags-reference/pages.html

The current version of Couch does not support ordering pages randomly. however the upcoming version (completed - work in progress on documentation) has a new parameter -'random', that does this.

Hope this helps.
Awesome, thanks!
Sincerely,
Johan

Brightsites
Webdesign, webdevelopment, webapplications, hosting, advice and more.
3 posts Page 1 of 1

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 1 guest