Jump to content

Recommended Posts

Posted

What is the best way to structure my pages in the back-end? I have different pages split in two different styled menu's. Three menu links of pages are bigger then the rest. Underneath the big button pages are some subpages.

-page

-page

-page 

-page

-page

--page

--page

 

 

MENU.jpg

Posted

I suggest you structure your pages based on how the front-end URLs should be (e.g. mydomain.com/page/subpage/) rather than how you happen to be styling your menus.

  • Like 1
Posted

The trouble is that if I place all pages in the main root, how do I output two different menu's? When I use this code all children are visible in the same styling. Must menu links be made invisible?

 

$homepage = $pages->get("/");
$children = $homepage->children;
$children->prepend($homepage); 

 

Posted

You have many options. One is to have the pages that you don't want on the main menu as "hidden", and build the second menu by hand. Another is to make a simple menu builder, for example on the home template, with two different page fields. There are more options, but I think those two are already pretty good.

  • Like 2
Posted

Selectors are your friend.

$my_special_pages = $pages->find("parent=/, name=foo|bar|baz"); // or match by template, or anything else
$my_other_pages = $pages->find("parent=/, id!=$my_special_pages");
// now build your menus from these PageArrays

 

  • Like 4

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...