Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

PageBuilder - sort subpages

Quote Reply
PageBuilder - sort subpages
Hi,

I am using PageBuilder to generate a simple page with a number of sub pages and generate the links as:

Code:
<%loop sub_page_loop%>
<a href="<%db_cgi_url%>/page.cgi?page=<%page_name%>"><%page_title%></a>
<%endloop%>

The above works well - however - how can I control the list order of subpages - it seems to be a bit random?

Thanks in advance
Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] PageBuilder - sort subpages In reply to
This is not currently possible, but I will add it in the next version.

If you want to hack, you can edit PageBuilder.pm around line 1653. Simply add the code in red:
Code:
sub _sub_page_list {
# --------------------------------------------------------
# Get a list of subpages

my $id = shift;

my $pb = $DB->table ('PageBuilderPage');
return $pb->tree->children( { id => $id, max_depth => 1, sort_col => 'page_title' });


}
(you can sort on different fields, of course).

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] PageBuilder - sort subpages In reply to
Thanks Ivan - works

Klaus

http://www.ameinfo.com