Can anybody give me a code to make an article or banner or link to appear only on homepage ? - only homepage - not on top links, not on submit page, not on "latest" pages and not on listings individual "details" pages - not in any category pages Anybody ? Thanks.
In your tpl file (where ever you want the code to appear) {if $category.ID eq 0 and not $list and not $search and not $pge} your banner here {/if} PHP: Im not a phpLD guru (yet ) so perhaps the experts will come and correct me. Its what I'm using to show the directory description on the homepage of zorg-directory.
Yeah it will actually...sorry about that. Will fire an email off to Zeb to tell him hes sacked for never sorting that on mine
{if isset($category.ID) and $category.ID eq 0 and !$list and !$search and !$pg} ...banner here... {/if} should only show on homepage. If you have something like dargre's pr listing stuff, you will need to add something after the !$pg: it would then go like this: !$pg and !$pr this is so you dont get the banner on the pr page stuff as well.
haha too funny! I use that same variable as a part of one my MODs as well. I guess it's just a matter of good scripting and descriptive MOD'ing
but I OR others add such code in footer/header/sidebar etc.. and so it displays. Can i create a new .tpl file and call it in main.tpl ? Will that work ? How ?
you can always create two different footer/header/sidebar tpl files, one with your "homepage only stuff" code and the other identical one without... (especially for details page) Then go to detail.tpl and edit the code at the top which says something like: {include file="header.tpl"} Code (markup): to {include file="[B]header-no-homepageonly[/B].tpl"} Code (markup):
yep, a great big thanks to all you coder guys, that has much improved a few of my directories where I wanted to advertise my other sites on the main page, cheers! MOG