Page 1 of 1

List all sub-pages title and content in one page

Posted: Mon Feb 25, 2008 2:28 pm
by Saulo Padilha
I want to do is something like this:

My pages structure is:

1 - Home
2 - Employees
2.1 - Bob
2.2 - Paul
2.3 - John

etc ..

What I want is that page "Employees" shows all the names and description of the Employees.

the page "Employees" HTML would be like this:

Bob
Bob works on "X" since bla bla bla ...

Paul
Paul is a engineers that bla bla bla

John
John doesn't do anything bla bla bla ...


In other words, a list of sub-pages:

{sub-page1 title}
{sub-page1 content

{sub-page2 title}
{sub-page2 content

{sub-page3 title}
{sub-page3 content

I could use the {menu ...} tag if it also list the {content} attribute, but it doesn't.

I guess that I have to use a structure like:

{foreach item=current from=contents}

{title}
{content

{/foreach}


Does anybody know how to do that ???

sorry about my english.

Re: List all sub-pages title and content in one page

Posted: Mon Feb 25, 2008 2:36 pm
by calguy1000
You'll need the get_page_content method from the cgsimplesmarty module, and a new menu template.

Re: List all sub-pages title and content in one page

Posted: Mon Feb 25, 2008 3:43 pm
by Saulo Padilha
Many thanks Calguy !! I installed the cgsimplesmarty module and create a menu template like this:

{if $count > 0}

{foreach from=$nodelist item=node}

  {$cgsimple->get_page_title($node->alias)}
  {$cgsimple->get_page_content($node->alias)}

{/foreach}

{/if}


on "Employee" page I use " {cms_module module="menumanager" template="listar_conteudo" start_level="2"} "


It works perfect !!!!!

BIG THANKS !

Re: List all sub-pages title and content in one page

Posted: Mon Sep 13, 2010 10:59 am
by nicmare
this works nearly perfect! thanks!

but can i somehow sort the "menu"? now they appear in the order represented by the order of the pages in the admin menu. but i want them to be ordered by a specific content block. i have a block (rating) which contains numbers 1-10 (for a rating). and now i want to sort it, starting with the highest number:

{menu template="summary" childrenof="reviews" sortby="result" limit="10"}

AND i want to display just 10 items out of 25 items…