Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Showing customheader.php only on home page?  (Read 2283 times)

0 Members and 1 Guest are viewing this topic.

statek

  • Contributor
  • Coppermine newbie
  • ***
  • Country: ua
  • Offline Offline
  • Gender: Male
  • Posts: 9
    • Kosiv photo
Showing customheader.php only on home page?
« on: March 08, 2014, 06:34:32 pm »

Hello.

I've set customheader.php in admin settings but want to display it only on home (index) page.

I know this content works for quests:

Code: [Select]
if (!USER_ID) { some content; }
I've tried 
Code: [Select]
($cat == 0) and
Code: [Select]
($CURRENT_CAT_DEPTH == -1) but without success :(

Please, advise what variable or function should I use in customheader.php to show it content on home (index) page only?
Logged

statek

  • Contributor
  • Coppermine newbie
  • ***
  • Country: ua
  • Offline Offline
  • Gender: Male
  • Posts: 9
    • Kosiv photo
Re: Showing customheader.php only on home page?
« Reply #1 on: March 09, 2014, 02:33:01 pm »

I found solution on previous themes:

And here is sample code detecting home (index) page:
Code: [Select]
global $CPG_PHP_SELF;
$superCage = Inspekt::makeSuperCage();
if ($CPG_PHP_SELF == 'index.php' && !count($superCage->get->_source))
{ home page }
else
{ not home page }
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Showing customheader.php only on home page?
« Reply #2 on: March 10, 2014, 05:02:34 pm »

Marking thread as resolved.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.