Access: Admin
Total Posts: 1395
Joined: 2006-05-19
When you specify a template in your include code, when you then click on one of the headlines that include generates, the page refreshes and shows that particular article, because you're on the same page which has the same include you're still assigning the template to it that you've specified.
So what you need to do is make your links redirect to another page that has an include on it, but doesn't have the $template variable specified.
So for example, this is your headlines include
Code:
<?php $template = "headlines"; include 'news/index.php'; ?>
The code for that headlines template change to something like this
Code:
<a href="fullstory.php?id={id}">{title}</a>
This will make the headlines show and once clicked it'll redirect to the page "fullstory.php"
Then on the fullstory.php page create a normal include but don't specify a template like so
Code:
<?php include 'news/index.php'; ?>
What will happen now is, on your headlines page, users will see the headlines, click on one, get sent to fullstory.php, on this page it'll display the full article and use whatever is the default template.