Hi,
how do I display the header section in a first page only?
TNX
Try using anycontent.php instead.
Quote from: Nibbler on August 14, 2006, 08:06:09 PM
Try using anycontent.php instead.
TNX Nibbler, but I use anycontent.php for a flash slideshow, below a breadcrumb.
no other solution?
open index.php
find
case 'anycontent':
if ($cat == 0) {
ob_start();
/**
* Any php code or HTML can be put in this file and will be displayed
*/
include('anycontent.php');
$anycontent = CPGPluginAPI::filter('anycontent',ob_get_contents());
ob_end_clean();
echo ($anycontent);
}
flush();
break;
below add
case 'anycontent2':
if ($cat == 0) {
include('anycontent2.php');
}
flush();
break;
this'll include anycontent2.php
use it like you did with anycontent
thanks Stramm, but anycontent doesn't appears above the page like header.inc
My problem is to show "header.inc" in the first page only, for a fast view of other page
How do I resolve it?
A solutions like:
if ($cat == 0) { include('header.inc');
}
is it possible?
Yes, just add the code into your header. Use ($_GET['cat'] == 0) to determine whether to output anything.
Quote from: Nibbler on August 15, 2006, 03:32:20 PM
Yes, just add the code into your header. Use ($_GET['cat'] == 0) to determine whether to output anything.
Ok, I've used:
if (!isset($_GET['cat'])) {
in header.inc and all work fine! :D
Problem solved!
Many tnx
Side note: include files shouldn't be named foobar.inc, but foobar.inc.php or similar. If they are just named foobar.inc, malevolent users who manage to find out the name of the include could browse your source code and possibly be able to find out sensitive details.
I'm aware that the use of just foobar.inc can be seen frequently, even on well-known script resources. However, you shouldn't adopt this bad practise.
Ok Gaugau, no problems! thank you for the suggestion
best regards