Hi,
I would like to have a left sub menu that only shows the children of the current section. So, for example, if i am browsing the news section, the children of the news node only appear on the left.
Also, if there are no children of the current node i would like to display some news items. How can i check if the child count of the current node is 0 ?
Thanks again
Code to display children of current section
Re: Code to display children of current section
I take it you know how to make the menu show children of current page, as for the put news in if no menu items to show thing you need some kind of {if} statement...
{if div !empty=1 show menu}
{else}
{news}
{/if}
Now keep in mind I'm not a programmer just a template builder, but I've seen enuf of this kind of code on this forum to make a guess at the syntax...
{if div !empty=1 show menu}
{else}
{news}
{/if}
Now keep in mind I'm not a programmer just a template builder, but I've seen enuf of this kind of code on this forum to make a guess at the syntax...

Re: Code to display children of current section
you can also pipe news in to the menu... then you only need to worrie about the child menu in general...
this has blogs as an ex... but you can switch blogs for news...
http://forum.cmsmadesimple.org/index.ph ... #msg136822
My2Cents
cheers
Jeremy
this has blogs as an ex... but you can switch blogs for news...
http://forum.cmsmadesimple.org/index.ph ... #msg136822
My2Cents
cheers
Jeremy
Re: Code to display children of current section
Having the same problem here: let's say I have three menu sections:
A -> child pages 1, 2, and 3
B -> child pages 4, 5, and 6
C -> child pages 7, 8, and 9
When I'm on page B, 4, 5, or 6 I'd like the submenu to include:
A
B
- 4
- 5
- 6
C
and when on A, 1, 2, or 3 I'd like to see:
A
- 1
- 2
- 3
B
C
Any thoughts? News/blog doesn't really work in my case, since the pages in question aren't news or blog entries (and since those modules don't do what I need them to, anyway).
This is CMS Made Simple 1.5.3.
A -> child pages 1, 2, and 3
B -> child pages 4, 5, and 6
C -> child pages 7, 8, and 9
When I'm on page B, 4, 5, or 6 I'd like the submenu to include:
A
B
- 4
- 5
- 6
C
and when on A, 1, 2, or 3 I'd like to see:
A
- 1
- 2
- 3
B
C
Any thoughts? News/blog doesn't really work in my case, since the pages in question aren't news or blog entries (and since those modules don't do what I need them to, anyway).
This is CMS Made Simple 1.5.3.
Re: Code to display children of current section
please tell me how about it?
Re: Code to display children of current section
Any chance you have looked at a default install, just asking as this is the exact menu type that is in most every page of the default install...
Re: Code to display children of current section
Are you talking about News or about regular Content.
Because with content, you can put the {site_mapper} on the page, to show links to all child_pages, and have it automatically showing new pages, when put in the same "section".
Ronny
Because with content, you can put the {site_mapper} on the page, to show links to all child_pages, and have it automatically showing new pages, when put in the same "section".
Ronny
Re: Code to display children of current section
Actually RonnyK they just want to have the menu work like it does in the default installs first page, you know click on parent and it shows the children...
Re: Code to display children of current section
maksbud,
your English is better then mine... I couldn't make that up from the information, I thought they just wanted the links showing on the section-pages.
Ronny
your English is better then mine... I couldn't make that up from the information, I thought they just wanted the links showing on the section-pages.
Ronny