Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with site-structure

Status
Not open for further replies.

bin4ry

Programmer
Feb 22, 2003
5
DE
hey awl,

i've got a problem with the structure of my site: my site consists of 4 parts: a linkbar left, a linkbar right, the main content in the middle and under all these parts a footer with some text n links.

_____________________
| | | |
| | | |
| | | |
|__|_______________|__|
|_____________________|

Should look like this. When i designed the first version of my site, i had to chose what to do: either use frames for the left and right part and for the footer, or equip all sites with all parts. I have chosen the last solution. The first time, it was no problem for me, to manage the site. But when my site grow, it was a problem: if i had to change just one link in the left or right part or in the footer, i had to apply this change in awl sites. That is some real hard work. No it's even impossible to do that, because my website contains about 50 single sites. I didn't choose frames, because they don't look good. If a user looks for my website via google.de oder any other search engine, it could be possible, that he'll only find a link to a frame. So i had to add a link to the whole frameset. Doesn't look good. But then i had the idea, that i could solve the problem, using php and includes. But there's another problem:

if my site structure is like this:


[x]website root folder
[x]art
[x]images
[x]includes
[x]service
[x]other folder
index.php


The php-include-code for left bar of the the index.php would look like this:
<?php include(&quot;includes/left_bar.inc&quot;); ?>

If there is a 'home'-link in the left bar, the hyperlink would look like this: 'index.php'
But if i include the left_bar.inc to the art.php (in the 'art'-folder) the link won't work, because the browser will browse this paath: '/art/index.php'. The hyperlink had to be '.../index.php'

Do ya know what i mean ?

I know it's awkwardly described but i hope, ya know what i mean. And sorry for my bad english.

Well there is a solution: my site structure had to be 1 level deep. Know what i mean ? The index.php hat to be in a folder,too.

[x]website root folder
[x]art
[x]images
[x]index
index.php
[x]includes
[x]service
[x]other folder

There may not be subfolders, under the art,images,uncludes-folders. Know what i mean ? just 1 level deep structure...

Well and sorry for my bad english....

Hope you have a better solution
 
If you do not want to use frames, than I recommend using templates.

Or like you have now - and just do find and replace to change the 50 odd pages. &quot;Never underestimate the power of determination&quot;

Stuart
 
I like the templates idea too. That's the easiest way to make site-wide changes with little effort.

Good luck. [gorgeous] Ladyborg
&quot;Many of life's failures are people who did not realize how close they were to success when they gave up.&quot; [Thomas A. Edison]
 
thnz for your help. I'm such a dumbhead. There's such an easy way to solve the problem: i can use the includes, BUT i have to use static urls like
Know what i mean ?

sorry for the topic...if there's such an easy solution
 
yup &quot;Never underestimate the power of determination&quot;

Stuart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top