Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

How to make top menu sections without content and jump to the first child?


Go to End
Reply


10 Posts   3712 Views

Avatar
cliersch

Community Member, 75 Posts

2 September 2008 at 6:03am

Edited: 02/09/2008 6:07am

I would like to have a navigation menu with two level. But there is no content on the top level pages, they are only sections for the structure. I would like to jump from the first level directly in each section to the first child item. How is it possible to realize it?

Avatar
cliersch

Community Member, 75 Posts

2 September 2008 at 8:57pm

Edited: 02/09/2008 8:59pm

I try to explain my problem again, please someone my help me.
I need to build a menu with this structure

Home

Products
-Product 1
-Product 2

Projects
-Project 1
-Project 2

Contact

The Products an Projects items have no content. I would like to reach directly the Product 1 page when I klick on the Projects section.
Is there any possibility to build this model?

Avatar
grilldan

Community Member, 135 Posts

2 September 2008 at 9:19pm

You could try making the Products and Project pages "Redirect Pages".

Avatar
cliersch

Community Member, 75 Posts

2 September 2008 at 9:41pm

Edited: 02/09/2008 9:42pm

Ok - good idea! But how woud you realize it concretely?

Avatar
Sean

Forum Moderator, 922 Posts

2 September 2008 at 9:41pm

Redirector pages linking to the first child would be the way to do it, as grilldan said.

Avatar
Sean

Forum Moderator, 922 Posts

2 September 2008 at 9:43pm

Edited: 02/09/2008 9:44pm

So you'd change the page type in the CMS (using the behaviour tab) for the Products and Projects pages to a "Redirector page".

Then, you'd choose the first child from the dropdown once the page is changed to a redirector. This means that if anyone hits that given page, it'll redirect them to the page chosen in the dropdown.

Avatar
SilverRay

Community Member, 167 Posts

2 September 2008 at 9:44pm

Edited: 02/09/2008 9:45pm

Hi tiga,

Or see here:

http://doc.silverstripe.com/doku.php?id=recipes:controllers

Avatar
cliersch

Community Member, 75 Posts

2 September 2008 at 10:15pm

Thanx to all of you! Great, it works!
I haven't found the easy way to use just an other page type! Thats the possibility for my project.
And it's good to know php function for an other project!
Great community! :-)

Go to Top