If Specific Page in Smarty

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
emorling
Forum Members
Forum Members
Posts: 45
Joined: Tue Oct 26, 2010 6:16 am

If Specific Page in Smarty

Post by emorling »

How do I make a conditional tag in Smarty for a specific page.

I tried this, but it didn't work.

Code: Select all

{if $content_obj->mName eq 'MY_PAGE'}
 {MY_UDT}
{/if}
Any ideas?
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: If Specific Page in Smarty

Post by RonnyK »

{if $page_alias=='the-alias-of-the-page'}
...
{/if}

Ronny
emorling
Forum Members
Forum Members
Posts: 45
Joined: Tue Oct 26, 2010 6:16 am

Re: If Specific Page in Smarty

Post by emorling »

Thanks! Verified and works like a charm.  ;D
Post Reply

Return to “The Lounge”