Posted by Mark Parnell on 02/14/06 04:54
Deciding to do something for the good of humanity, John Salerno
<johnjsal@NOSPAMgmail.com> declared in alt.html:
> Hmm, but what if I want to put the entire block of menu items into a PHP
> file and include() that in the HTML file?
That's what my post was intended for.
> The above wouldn't work,
> because it still uses a page by page method.
Just put all the links together.
<ul id="main-menu">
<li<?php if(basename($_SERVER['PHP_SELF']) == 'location.php') {print('
id="uberlink"');} ?>>Home</li>
<li<?php if(basename($_SERVER['PHP_SELF']) == 'location2.php') {print('
id="uberlink"');} ?>>Another Place</li>
<li<?php if(basename($_SERVER['PHP_SELF']) == 'location3.php') {print('
id="uberlink"');} ?>>Somewhere Else</li>
<li<?php if(basename($_SERVER['PHP_SELF']) == 'location4.php') {print('
id="uberlink"');} ?>>Yet Another Location</li>
</ul>
--
Mark Parnell
Now implementing http://blinkynet.net/comp/uip5.html
Navigation:
[Reply to this message]
|