[SOLVED] News module on homepage only

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
johanna
Forum Members
Forum Members
Posts: 11
Joined: Tue Apr 03, 2007 4:37 pm

[SOLVED] News module on homepage only

Post by johanna »

Hello!

I have been searching the forum but can't find an answer to this... I would like the news module and a global content block that I have created to reside on my homepage only, not on the rest of the pages. How do I achieve this?

Thank you!!

Johanna
Last edited by johanna on Mon Jul 23, 2007 7:51 pm, edited 1 time in total.
savagekabbage
Forum Members
Forum Members
Posts: 75
Joined: Mon Apr 23, 2007 3:51 pm

Re: News module on homepage only

Post by savagekabbage »

There are a few ways you can achieve this.  One way would be to create a new template just for use on the home page.

Another way would be to put an {if} statement in the template.  The templates are smarty based so any smarty tags will work.
Something like this should work:

{if $page_alias='home'}
    {global_content name='home_news'}
{/if}
johanna
Forum Members
Forum Members
Posts: 11
Joined: Tue Apr 03, 2007 4:37 pm

Re: News module on homepage only

Post by johanna »

Doh! I am such a dumbo...! Didn't think of the template idea, works a treat. Thank you so much for pointing me in the right direction, much appreciated!!!!

Johanna
Post Reply

Return to “CMSMS Core”