AscIId Posted June 18, 2007 Share Posted June 18, 2007 Hi there, just wondering what way is the best way to do menus and MULTIPLE layouts and languages in PHP? Quote Link to comment https://forums.phpfreaks.com/topic/56085-best-way-to-do-menus/ Share on other sites More sharing options...
Psycho Posted June 18, 2007 Share Posted June 18, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/56085-best-way-to-do-menus/#findComment-277100 Share on other sites More sharing options...
cooldude832 Posted June 18, 2007 Share Posted June 18, 2007 you mean if you want a site in english,spanish,german,italian etc etc? Yes you can do it in php but you would need to have language libraries Quote Link to comment https://forums.phpfreaks.com/topic/56085-best-way-to-do-menus/#findComment-277105 Share on other sites More sharing options...
cooldude832 Posted June 18, 2007 Share Posted June 18, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/56085-best-way-to-do-menus/#findComment-277108 Share on other sites More sharing options...
AscIId Posted June 19, 2007 Author Share Posted June 19, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/56085-best-way-to-do-menus/#findComment-277429 Share on other sites More sharing options...
harristweed Posted June 19, 2007 Share Posted June 19, 2007 when the url is index.php?page=home.php?x=2&y=3 try when the url is index.php?page=home.php&x=2&y=3 Quote Link to comment https://forums.phpfreaks.com/topic/56085-best-way-to-do-menus/#findComment-277465 Share on other sites More sharing options...
AscIId Posted June 19, 2007 Author Share Posted June 19, 2007 i have treid that, it doesnt work, if you think about it logically i am trying to include page.php?x=blahy=blah Quote Link to comment https://forums.phpfreaks.com/topic/56085-best-way-to-do-menus/#findComment-277783 Share on other sites More sharing options...
AscIId Posted June 19, 2007 Author Share Posted June 19, 2007 http://www.hostgrid.net/testing/index.php?page=home.php?x=f00&y=ness http://www.hostgrid.net/testing/home.php?x=f00&y=ness spot the difference Quote Link to comment https://forums.phpfreaks.com/topic/56085-best-way-to-do-menus/#findComment-277872 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.