[solved] How to show content only on some pages

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
matrlx

[solved] How to show content only on some pages

Post by matrlx »

Hello,
I want to show some html that I did only on the Home page, so I did this tag {meuphp} that do this:

if ($node->menutext == 'home') echo "html code"; else echo "";


But when I enter index.php?page=home the html code is not showing =/ why ? I already tried $page and $node instead of $node->menutext


Help please.
Last edited by matrlx on Thu May 08, 2008 12:15 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: How to show content only on some pages

Post by calguy1000 »

{if $page_alias == 'home'}You're on the home page{/if}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
matrlx

Re: How to show content only on some pages

Post by matrlx »

Thank you! It worked :)
Post Reply

Return to “Developers Discussion”