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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
haapati
Forum Members
Forum Members
Posts: 20
Joined: Sun Sep 10, 2006 4:14 pm

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

Post 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.
Last edited by haapati on Fri Nov 26, 2010 9:30 am, edited 1 time in total.
klenkes
Power Poster
Power Poster
Posts: 307
Joined: Mon Sep 08, 2008 9:43 am

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

Post by klenkes »

Have you tried the plugin content_dump? http://dev.cmsmadesimple.org/projects/contentdump

It does all you want to do!
Peciura

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

Post 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}
haapati
Forum Members
Forum Members
Posts: 20
Joined: Sun Sep 10, 2006 4:14 pm

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

Post by haapati »

This CGSimpleSmarty module works me very well.

Thanks for help!
Post Reply

Return to “CMSMS Core”