Jump to content

Best way to do menus


AscIId

Recommended Posts

Your question is too generic, you need to be more specific. Personally I would have different template and menu files. How you choose between them would depend on what the trigger is. If it is based upon user, I'd probably use a cookie or a database entry or both.

Link to comment
https://forums.phpfreaks.com/topic/56085-best-way-to-do-menus/#findComment-277100
Share on other sites

and for multiple layouts are you talking complete rebuild or reskin? if its a reskin php can easily handle that using an array that contains all the reskinned css and images, if its a different structure then it will be more complicated and you need to ask yourself if a structural change is needed?

Link to comment
https://forums.phpfreaks.com/topic/56085-best-way-to-do-menus/#findComment-277108
Share on other sites

what i have at the moment is a page called index. currently i have not worked on langauge integration because the system does not requre it yet.

 

index.php

 

if ($layout==""){ $layout = 1; } elseif (layout=>4){ $layout = 1;}

include ("/layouts/layout".$layout.$php);

 

layouts/layout1.php

 

include ("layout1/pagefragments/top.php");

nclude ("layout1/pagefragments/sidemenu.php");

nclude ("layout1/pagefragments/footer.php");

nclude ("layout1/pagefragments/content.php");

 

layouts/layout1/pagefragments/content.php

 

if ($page == ""){ $page="home.php"}

include ("../../../".$page);

 

 

that is what i have but i am having problems when i want HTML URL variables for the page.

 

when the url is index.php?page=home.php?x=2&y=3

 

and home.php has echo ($x.$y);

 

only x is shown but if i go to home.php both numbers are shown

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/56085-best-way-to-do-menus/#findComment-277429
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.