December 2nd, 2013, 09:17 PM
Help with navigation bar template
OK, I know this is going to sound ridiculous but I am stuck and spent the last 3 hours trying to figure this one out and nothing yet.
I have the most basic website file structure.
I have my site root directory called: tenant
I have a navigation bar with links to my other pages that are in my directory: tenant/pages
I created a nice looking ccs3 navigation link bar template that I include at the top of each page with the php include function. this is working great. the problem that I have is my index(default page is in my root directory tenant and all my other pages are in the tenant/pages directory. I can go from index to any page no problem but once I am on a page that is sitting inside my tenant/pages directory I get errors.
this is what I have so far
and it doesn't work. been at it for 3 hours and tried to get some help online but nobody seem to have the kind of directory structure that I have. everybody is showing an example of going back and forth from one page to another. but when you have multiple pages it doesn't work. can some one help? is it possible to make a navigation bar template or you have to make several templates for links that are outside a folder?
December 2nd, 2013, 09:33 PM
Ok I answered my own question. I made two different copy of my navigation template and this fixed the problem.
Originally Posted by jaad
December 3rd, 2013, 01:49 AM
If you want to do it the "right" way you've got three choices.
The best way to do it is using option 1. That way there's no ambiguity, you always know exactly where a link is pointing to and it's very very easy to see.
- Use complete URL's - http://www.mysite.com/pages.private.php
- Use a root-relative URL - /pages/private.php will take you to www.mysite.com/pages/private.php from any other page on the site
- Use some server-side scripting to automate where the links point to.