|
Posted by henri on 10/05/07 19:22
On Fri, 05 Oct 2007 13:00:34 -0500, Salve Håkedal wrote:
> I'm going to make a small site whith a structure something
> like this:
>
> Navigation: | Files:
> Home | index.php, in the web-page root directory
> About us | about_us.php, in the web-page root directory
> Band | referring to index.php in subdirectory
> Theatre group | referring to index.php in another subdirectory
>
> The subdirectories should be able to contain subdirectories...
>
> I want 2 things to happen in the navigaton:
> 1. If for example Home is the active page, it should not be a
> hyperlink.
>
> 2. If pages f.ex. in Band directory is the active page
> (not if it's index.php in its directory), it too should appear
> with its title not a hyperlink, AND with each level in its
> path as hyperlinks, like this:
> Home
> About us
> Band
> dirlevel (of bands directory)
> subdirlevel
> active file
> Theatre group
>
> ---
> I can't figure this out easily, but I'm shure it has been done
> before!
>
what you can do is get the current path and explode it, then you can
always figure out on what page you are and in which directory etc and you
echo your stuff accordingly. It's pretty straightforward.
Navigation:
[Reply to this message]
|