[solved] Page as just parent/section but no content? Displays first of children?

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.
Locked
Benek

[solved] Page as just parent/section but no content? Displays first of children?

Post by Benek »

I have a site that I want setup like this:

Home
-Section One
--Section One sub-page 1
--Section One sub-page 2
--Section One sub-page 3
-Section Two
--Section Two sub-page 1
--Section Two sub-page 2
-Section/Page Three
-Section/page Four

As you can see some of the level 2 pages will have children, and some will just be a single page. What I want is to have the pages with children (e.g. Section One) to act more like a directory and not a page. Meaning when I click to go to Section One it doesn't have it's own content but rather it displays the first of it's child pages (e.g. Section One sub-page 1). The sub-menu for that section would be a list of all children within that section.

But, at the same time, some sections like Section Three, will just be that one page so I want it to behave as a normal page. Each of the sections will show up in the main menu as if they were all pages on the same level and you cannot tell that a page has children until you enter that page and then a sub-menu is displayed.

Does that make sense?

So how do I set that up? I can, of course, easily create the structure as a bunch of page and then child pages under them where necessary, but I don't know how to make it so that when I click a parent page it goes to it's first child rather than displaying it's own content. Is it possible?
Last edited by Benek on Fri Sep 05, 2008 3:54 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Page as just parent/section but no content? Displays first of children?

Post by Dr.CSS »

Benek

Re: Page as just parent/section but no content? Displays first of children?

Post by Benek »

I've done that, thanks.

Do you suggest I just disable the pages that have children so they don't show up in the menu and then replace that with a link in the menu that goes directly to the first child page of that parent?

My only problem with that is what happens if a content editor creates a new child page and moves it above the old first child. Then my link no longer points to the first child page. That's not as automated as I'd hope for.

Any better ideas?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Page as just parent/section but no content? Displays first of children?

Post by Dr.CSS »

Well you didn't say that ;) you can use a page id number type thing for the link?...
Benek

Re: Page as just parent/section but no content? Displays first of children?

Post by Benek »

Page id number for the link? That sounds promising. Tell me more.

Do you mean that I can somehow create a link that will go to, say, 2.1 (.1 being the first child of section 2) and if I create a new child and move it up to the first spot it will take on that number--so the link will always point to first child even if that child changes?

Another option I can think of -- just create a redirect on the parent page that goes to it's first child. Hopefully it would redirect fast enough that the user would never notice. Bad idea?
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Page as just parent/section but no content? Displays first of children?

Post by RonnyK »

Why not make the parent with the type of "Internal link" and point to the first child as the page to be opened.

Ronny
Benek

Re: Page as just parent/section but no content? Displays first of children?

Post by Benek »

Thanks RonnyK. I completely overlooked that option. That should work fine.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [solved] Page as just parent/section but no content? Displays first of child

Post by Dr.CSS »

@ RonnyK, was trying to get them to read and learn  ;)...
Locked

Return to “CMSMS Core”