SimplePortal

Customization => Custom Coding => Topic started by: freeopkiller on April 04, 2010, 10:35:10 AM

Title: New Page Identifiers
Post by: freeopkiller on April 04, 2010, 10:35:10 AM
I'm trying to hide the forum menu on my main index page :
index.template.php
Code: [Select]
if ( ($hidemenu=="/index.php") or (SIMPLEPORTAL PAGE INDENTIFIER) )
        echo "my new menu";
else
template_menu();

This works for me on the main page. I'm trying to find an identifier that would also hide the menu in all pages I created within the admin/simpleportal/pagelist  is there a variable I can use to globally identify these pages to prevent the main menu from displaying ?
Thanks
Title: Re: New Page Identifiers
Post by: Nathaniel on April 04, 2010, 07:37:57 PM
Try using "!empty($_GET['page'])" in your if statement.
Title: Re: New Page Identifiers
Post by: freeopkiller on April 04, 2010, 10:06:48 PM
 
8) EXCELLENT !  Works Great, Hides menu on every page except smf core pages. Thank You, Much appreciated..

Code: [Select]

// File index.template.php

$hidemenu = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if ( ($hidemenu==$scripturl) or (!empty($_GET['page'])) )

  echo "my new menu";
else
  template_menu();
Title: Re: New Page Identifiers
Post by: Sam12345 on December 14, 2010, 12:36:33 PM
Hi
I am trying to achieve this in my custom theme but it is not working. Would you be kind enough to explain this a little further.
Thanks
Sam
SimplePortal 2.3.8 © 2008-2024, SimplePortal