php include menu

Post your questions and problem reports here.

php include menu

Postby MaxD » Fri Feb 20, 2009 7:45 pm

I'm looking at Easy button & menu maker for a new site, and been looking into using more php to save time. Is using php includes a good way of adding this menu to my pages? Should the links to the files created be relative or absolute urls?
Amateur web design now dabbling with php and jquery
User avatar
MaxD
 
Posts: 127
Joined: Mon Dec 18, 2006 10:05 pm
Location: UK

Re: php include menu

Postby Karlis » Fri Feb 20, 2009 9:49 pm

You can select whether to use absolute or relative URLs when creating your menu code. I recommend absolute paths if you use php.
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
Karlis
Site Admin
 
Posts: 3598
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe

Re: php include menu

Postby MaxD » Mon Feb 23, 2009 1:25 am

Thanks for the info. Absolute urls seems easier, as folders get moved etc. Will try it out.
Amateur web design now dabbling with php and jquery
User avatar
MaxD
 
Posts: 127
Joined: Mon Dec 18, 2006 10:05 pm
Location: UK

Re: php include menu

Postby Mitch » Sat Jan 23, 2010 6:11 pm

Hi Max,
I use php and I "include" the menu code (menu.htm in my case) on my pages by doing something like this:

Code: Select all
<div align="center"><?php include("menu.htm"); ?></div>


It is a great way to easily add your menu to every page.
"menu.htm" is the output generated by MenuMaker.
Of course, don't forget to use the PHP extension for your pages.
Mitch
 
Posts: 7
Joined: Fri Nov 20, 2009 12:13 am


Return to Easy Button & Menu Maker Support

Who is online

Users browsing this forum: No registered users and 10 guests