Quote:
Originally Posted by ryancooper
I am looking to hide ads on my pages... I used
Code:
<vb:if condition="THIS_SCRIPT == view AND $pg == 'hours'">
Dont Show Ad
<vb:else />
Show Ad
</vb:if>
but the code shows everywhere. I am wondering if it is because I am using SEO friendly links os my links look like
.../forums/hours.htm
in stead of
.../forums/view.php?pg=hours
Is this why? Is there a way around this?
Thank
|
You are probably putting this code inside header/footer templates but these templates are produced before webtemplates loads. So they are already parsed (and
$pg == 'hours' conditional is always wrong) when your hours page starts. (Hence ads display).
Reparsing them inside phpinclude section of webtemplate might help:
PHP Code:
$templater->register('footer', $footer);
$templater->register('header', $header);