allright Posted June 29, 2008 Share Posted June 29, 2008 Hi all, My current "index.php" is using the default "header.php", as the following: <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> While, when I click a category or a manufacturer, I hope to use another header template, e.g.: "header_customized.php" for the "index.php?cPath=" and "index.php?manufacturers_id=". How to update this accordingly in the "index.php"? Please kindly give some hints and advice, thank you very much! Best regards, allright Quote Link to comment Share on other sites More sharing options...
germ Posted June 29, 2008 Share Posted June 29, 2008 This post may give you some hints: Click Me Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
allright Posted June 29, 2008 Author Share Posted June 29, 2008 This post may give you some hints: Click Me Hi Jim, Thanks a lot! I added the following code in "index.php" <?php if( $cPath != 0 || manufacturers_id !=0 ) { require(DIR_WS_INCLUDES . 'header_customized.php'); } else require(DIR_WS_INCLUDES . 'header.php'); ?> Now, 1. cPath is taking effect, when I click category, it will use 'header_customized.php' 2. But, "manufacturers_id !=0" doesn't take effect, it still use 'header.php'. Any hints? appreciate much! Best regards, allright Quote Link to comment Share on other sites More sharing options...
germ Posted June 29, 2008 Share Posted June 29, 2008 This may work: if( $cPath != 0 || $HTTP_GET_VARS['manufacturers_id'] !=0 ) { require(DIR_WS_INCLUDES . 'header_customized.php'); } Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.