Page 1 of 1
How should i create a menu?????????
Posted: Wed Jul 07, 2004 11:28 am
by jaswinder_rana
Hi,
if my menu is something like
Home
About Us
.....
Contact Us
then how should i create it.
1) should i make it a static page and just include it every where?
2) should i use files and then create it on the fly?
3) should i use database?
these links almost gonna be same for all the pages. its just i wanna design my own very small content management system to allow some body from inside to change the content whenever they want to.
and also if i use templates then how does there work?????????
thanx in advance[/b]
Posted: Wed Jul 07, 2004 12:08 pm
by feyd
you could use all 3.. I'd go with 1 and 3 myself. Build/use a template system (1) for the look and feel, but no content. Use a database (3) for finding the site structure and fill in the content areas of the template.
Posted: Wed Jul 07, 2004 12:39 pm
by penguinboy
I store my menu links in an external XML file and parse it with php5's simpleXML.
Posted: Wed Jul 07, 2004 1:14 pm
by jaswinder_rana
you could use all 3.. I'd go with 1 and 3 myself. Build/use a template system (1) for the look and feel, but no content. Use a database (3) for finding the site structure and fill in the content areas of the template.
_________________
--feyd
so You mean to say i have to use both of them???
But i fear about 2 and 3 is if for 3 for some reason there is some problem with file and for 3 if there is some problem with database then nothing would would work properly
Posted: Wed Jul 07, 2004 2:48 pm
by Buddha443556
so You mean to say i have to use both of them???
But i fear about 2 and 3 is if for 3 for some reason there is some problem with file and for 3 if there is some problem with database then nothing would would work properly
I though feyd was very clearly stating his own preference to use 1 and 3. You have to decide what works for you. Me? I use a lot of 1's but a lot of my sites are pretty much static -- that's not really my preference it just how it worked out.
If your worried about 2 and 3 maybe generate the menu only when you change it and use 1.
Posted: Wed Jul 07, 2004 3:58 pm
by xisle
store the menu in a database for easy editing,
build the menu flat when a change is made...
or maybe not