Nieuw lid |
|
Now will examine the situation when you want to use more than one include on a single page. For example if you want to show 5 headlines (using template headlines) and below them to be shown all other news. The problem in this situatuion situation is that when you click on a headline CuteNews won't understand where to show the result, on the headlines part or where all other news are included. The solution is to use the variable = TRUE; before including the headlines. When you use this variable CuteNews won't display any result on the place where you use .
Here is the correct code of the above example with the headlines and news:
<?PHP
Our Latest 5 Headlines:
$static = TRUE;
$number = "5";
$template = "Headlines";
include("path/to/show_news.php");
The News
include("path/to/show_news.php");
?>
Now When you click on a headline it will be displayed on the place of the other news and the list with the latest 5 headlines will still be showed.
Make some test with $static = TRUE; yourself to understand how it works exactly and how powerful it can be.
deze code moet ik ergens neer zetten maar ik weet niet waar of hoe? |