What this does it condense the amount of typing in the path of included files. My problem is somewhat different and since some programmers I've spoken to don't seem to understand my situation I will try to explain my objective better so I can get some ideas.
My root folder contains my index.php page, some layout includes (header.php, footer.php, etc.) and the standard connection/authentification files. It also contains a folder for images, one for scripts, and currently one for my CMS, which houses all the application files to keep pages organized and separated.
What I want to achieve is a stable graphical layout with changing content. Kind of what frames did for HTML by avoiding having the layout tables in each page of code. The only way I can think of doing this in PHP is by using header and footer includes to sandwich my application code. It's a little rough, but it's the best option I've got at the moment.
As I mentioned before, I'm including these pages in files contained in the root/ folder and in the root/cms/ folder. While the graphical (and links) work in the latter, they dont work in the former as the paths search for (example) "images/testpic.gif" although the images folder resides one level above the cms folder.
The short answer I'm looking for is how to resolve my particular issue. The long answer, is whether or not I'm approaching layout management correctly and what alternatives do I have?
Tx.
|