Page 1 of 1

[solved] How to list parent pages summary content block in top page

Posted: Fri Oct 01, 2010 9:00 am
by haapati
Well, I have page hierarcy like this:
1. Products
1.1. Hammer
1.2. Saw
1.3. Flashlight
1.4. Crowbar
All parent pages have {content block="Summary"}

How do I list all parent pages Summary -content block in Products -page? I think the solution is a self made user tag where is a while loop. Let me know the solution.

Re: How to list parent pages summary content block in top page

Posted: Fri Oct 01, 2010 10:48 am
by klenkes
Have you tried the plugin content_dump? http://dev.cmsmadesimple.org/projects/contentdump

It does all you want to do!

Re: How to list parent pages summary content block in top page

Posted: Fri Oct 01, 2010 11:01 am
by Peciura
If understand correctly you call 1.X pages "parent", don't you ?

Use CGSimpleSmarty module methods "get_children" and "get_page_content"

Code: Select all

{$cgsimple->get_children($page_alias,'','children')}
{if count($children)}
	{foreach from=$children item='child'}
		{$cgsimple->get_page_content($child.alias,'Summary', 'tmp')}
		{eval var=$tmp}
	{/foreach}
{/if}

Re: How to list parent pages summary content block in top page

Posted: Wed Oct 13, 2010 7:17 pm
by haapati
This CGSimpleSmarty module works me very well.

Thanks for help!

Re: How to list parent pages summary content block in top page

Posted: Thu Oct 14, 2010 6:40 pm
by Dr.CSS