By joelio12 on
I need to include a certain php file in page.tpl based on the page. For example, if you're on the "services" page, then I need service sub-links to show up (with use of php include in page.tpl), while on the "projects" page I need project sub-links to show up instead. I don't know much about php but I'm assuming its some if statement...
so basically the page url (or some id) needs to determine which php file to be included per page. Thanks!
Comments
There might be an easier
There might be an easier way, if all your "sections" are links in the primary links/menu you can use the secondary links feature to do this much easier. In this case you build out the secondary links as children of the primary menu items. Make sure under "Adminster" > "Site building" > "Menus" > "Settings (a tab) that both " Menu containing primary links" and "Menu containing secondary links" use the same menu (typically "Primary links"). Then enable the menu under "Adminster" > "Site building" > "Blocks".
If the primary links do not contain all the "sections" you can do something similiar (though more manual) by making one menu per "section" (ie the "Services" or "Projects" sub-links). Then enable all the menus (again under "Blocks") and place them in the same region. Now by using the PHP to set the block visibility you can conttrol which block shows when. The PHP will depend how you have defined a section.
good thinking
good thinking, that is much easier. Do you happen to know how I can arrange the sub links go side-by-side horizontally rather then stacked vertically?
thanks for your help!
Yes, using CSS.
Yes, using CSS.
yes but how
right, but what do I need to define (and to what) to do that?
Something like this, you may
Something like this, you may need to adjust depending on the html for your menu. My menu's html looks something like
So given the id of the order list is 'footer-nav' you css would look something like
You may wish to change margin/padding.
nice
excellent, thanks again
IE formatting...
The li links appear as stair steps in IE (7), while they are fine (horizontal) in firefox.. any ideas?