apollowebdes Posted July 13, 2009 Share Posted July 13, 2009 Hi All, I basically know very little about PHP and need some help. I am working on a joomla template with virtuemart. What i would like to do is have a module position not show on a particular virtuemart page. What i have so far only turns of the modules for that page off, not the whole module position. I need to know the PHP code to stop a section of code(RIGHT COLUMN) showing if it == the virtuemart page. This is what i tried. My basic code in yellow. <?php if(@$GLOBALS['page'] != "shop.product_details"){ ?> <?php if ( $ammd_left || $ammd_right ) { ?> <!-- RIGHT COLUMN --> <div id="ammd-colwrap"> <div class="ammd-innerpad"> <?php if ($hasSubnav) : ?> <div id="ammd-subnav" class="moduletable_menu"> <h3 class="clearfix"><span class="right-bg clearfix"><span class="left-bg">On this page</span></span></h3> <div class="ammd-boxct-wrap"><div class="ammd-box-ct"> <?php if ($ammdmenu) $ammdmenu->genMenu (1,1); ?> </div></div> </div> <?php endif; ?> <jdoc:include type="modules" name="left" style="ammdmodule" /> <jdoc:include type="modules" name="right" style="ammdmodule" /> </div></div> <?php } ?> <!-- //RIGHT COLUMN --> <?php } ?> So if anyone can help me to stop this section of code(RIGHT COLUMN), loading on the shop.product_details page that would be fantastic. Thanks in advance. Matt Link to comment https://forums.phpfreaks.com/topic/165759-bypass-php-code-if/ Share on other sites More sharing options...
Andy-H Posted July 13, 2009 Share Posted July 13, 2009 if ($GLOBALS[] == 'EVIL') echo 'Dont use them.'; <?php if( $page != "shop.product_details" ){ ?> Try that instead? --- Where is the variable defined? Is it get data int the "query" part of the url??? Link to comment https://forums.phpfreaks.com/topic/165759-bypass-php-code-if/#findComment-874374 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.