Im trying to set my site up to be dynamic in design.
Meaning, I would like to have one file for the menu, one file for the header, onefile for the footer and a “Template” that I could save as each new web page I create. I have managed this to a certain extent using SSI such as this one for my MENU:
<!-- Calling Menu file //-->
<?php
require('framework/Menu.php');
?>
<!-- End Calling Menu file //-->
THe problem I am having is this. I want to have a folder hierarchy that is managable.
Base site = pmachine, the weblog.php lives there along with some other files.
mailinglist folder of the base folder some page files live there
framework of the base file for the require files and the templates and so fourth.
images= a folder off the main folder
and so on.
I have figured out how to address my menu items so they can be called from a page in any folder and work using the full path like so:
<p class="menuitems">
<a href="/pmachine/weblog.php" title="Jump to the main page">Home</a><br />
<a href="/pmachine/weblog.php?id=P7" title="Learn about A Still Small Voice">About Us</a><br />
<a href="/pmachine/WhatsNew.php" title="Whats new at a Still Small Voice">Site News</a><br />
<a href="/pmachine/Letter.php" title="Our On-Line content">The Word</a><br />
<a href="/pmachine/twocent.php" title="Share your thoughts">Your 2 Cents</a><br />
<a href="/pmachine/mailinglists/subscribe.php" title="Join one (or all) of the mailing list">Subscribe</a><br />
<a href="/pmachine/archivesum.php" title="Search the Archives">Archives</a><br />
</p>
<?php member_login_navbar(); ?>
but i cant seem to use this approach with my require statements.
<!-- Calling Header file //-->
<?php
require('/pmachine/framework/Header.php');
?>
<!-- End Calling Header file //-->
I would like to be able to embed these lines of code in my template and use them everywhere on my site without having to change code.
Any word on where I am missing it?
TIA
