I have a banner on the top of each page (code is in layout.tpl) I would like to remove the ad on listings that are marked as featured (the advertisement would be displayed on all other pages). I'm not very good with smarty templates or php but I sometimes I get lucky.. basically on the layout.tpl page I want to put some code above and below the advertisement.. here's what I've come up with but its not working Code: {if $body=='viewlisting2.tpl'} {elseif $featured! == "N"} advertisement here {/if}
Just going from something I had worked on in the past...try this and see if it works: Code: {if $body=='viewlisting2.tpl' && $featured!=='Y'} advertisement here {else} show something else {/if}
I tried this - changing both "Y" and "N" in "entry.featured!=='N'}" and every page showed "2" except for the listing pages, which showed "1" regardless if it was a featured listing or not. Code: {if $body=='viewlisting2.tpl' && $entry.featured!=='N'} 1 {else} 2 {/if} Any other ideas? I'd be willing to pay for your time if you will have to look into it.
I figured it out. I had to remove "entry." from your code. Regardless you helped me out. PM me your paypal email so I can buy you lunch.