Page 2 of 2
Re: Add tags to template for specific pages/ exclude pages
Posted: Thu Apr 19, 2012 6:57 pm
by ladyr0gue
[quote="Dr.CSS"]Sorry...
{if $page_alias == 'news'}
top job that's the one! Knew we'd get there in the end

thank yoooooou
edit: it does still return a 'some content' block on every page - though I guess it's not a biggie - now using
Code: Select all
{if $page_alias == 'news'}
{content block='some content'}
{else}
{news number="1"}
{/if}
Re: Add tags to template for specific pages/ exclude pages
Posted: Thu Apr 19, 2012 8:20 pm
by ladyr0gue
You know it has just occured to me that I really don't need that 'some content' block at all - as I have a content block below news which fills the same space if news doesn't exist. What ideally I would to say is: if pagealias =="news", do nothing, else call {news}. Is that possible
?? sorry for being difficult :/
Re: Add tags to template for specific pages/ exclude pages
Posted: Fri Apr 20, 2012 8:53 am
by ladyr0gue
Woot Woot! Just managed to find through trial and error that this seems to do what I am trying to achieve...
{if $page_alias == 'news'}
{*}
{else}
{news number="1"}
{/if}
is that the correct way of doing it? if page=news do nothing and else show news summary?
Re: Add tags to template for specific pages/ exclude pages
Posted: Fri Apr 20, 2012 11:46 am
by mcDavid
It's correct but you can be shorter:
Code: Select all
{if $page_alias !== 'news'}
{news number=1}
{/if}
the ! means: NOT
Re: Add tags to template for specific pages/ exclude pages
Posted: Fri Apr 20, 2012 11:57 am
by ladyr0gue
mcDavid wrote:It's correct but you can be shorter:
Code: Select all
{if $page_alias !== 'news'}
{news number=1}
{/if}
the ! means: NOT
thank you

Re: Add tags to template for specific pages/ exclude pages
Posted: Sat Apr 21, 2012 6:46 pm
by Dr.CSS
Re: Add tags to template for specific pages/ exclude pages
Posted: Sat Apr 21, 2012 6:59 pm
by Jo Morg
Oppsy!!!! I should have caught that error before... sorry! Been busy and running from one place to another.
If I had been more careful in answering, this thread would probably be a lot shorter...

Re: Add tags to template for specific pages/ exclude pages
Posted: Sun Apr 22, 2012 12:20 am
by ladyr0gue
no worries, thanks anyway, you helped me pass the time while I was waiting hehe
