Jump to content

Calling content from another page


Jetheat

Recommended Posts

I have a template page called template.php.

It contains the header, left nav bar, right nav bar and the footer.

So the only place available for content is the middle (inside a table).

 

Now, I want relevant content displayed in the middle of this page depending on which link the user clicks on the nav bars.

 

The content for each link will be contained in another file in another folder.

 

So if the user clicks on the "about us" link, the php should display the contents of the /mainfolder/about.php file.

 

So, in the middle of teh template page, I have placed some code which says:

 

<!-- content -->
<div id="content">
{{content}}
</div>

Now all I need to do is define what "content" is and call it, right?

My about page consists of a lot of html. How do I get that whole page to display within the center of my template page and yet the user sees about.php in their address bar.

Furthermore, my template.php references a stylesheet in the same folder.
All the pages which are called into the middle of the template page are in other folders on my server and if they are requested, then the reference to the stylesheet is not there anymoe.

How do I solve this?

Appreciate the help.

JH

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.