AdvancedNews-plugin and Portalpage_Sport Template

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
Posts: 4
Joined: Thu Nov 13, 2008 6:27 pm
Location: Ostseebad Nienhagen, Mecklenburg-Pomerania

AdvancedNews-plugin and Portalpage_Sport Template

Post by rotzepopel » Sat Jan 31, 2009 7:58 pm


i use the Template "portalpage_sport" for my website. For a Newspage i have created a New Page called "News". Then i have installed the "AdvancedNews"-plugin from All works fine, but the Newsbox in the Template keeps empty. Only when the Newspage is displayed the Box displays the News. On all other Pages the Newsbox keeps empty. I use the following command on the Newspage: #cmsimple $output=shownewsbox('showlatest =5,alwayspublish=true');#

I don't know anything about PHP and how i must change the template. :(

Thanks for any help.

Best Regards


Posts: 1649
Joined: Wed Dec 17, 2008 5:08 pm

Re: AdvancedNews-plugin and Portalpage_Sport Template

Post by svasti » Fri Mar 06, 2009 12:27 am

Hi Edmund,

If you have a plugin command on a page, this command will only be executed when you are on the page where you put the command. If you are on another page, the command is not used. So it will not work with a newsbox, because the newsbox displays content, when you are on another page.

If you want a plugin command to generate something always, you have to put the commant into the template. Something like:

Code: Select all

<?php echo MY_PLUGIN_COMMAND(); ?>
If you want the plugin command only on certain pages and on other pages a newsbox, try this:

Code: Select all

<?php if ($news==''){echo MY_PLUGIN_COMMAND();}else{echo newsbox($news);} ?>
The command for the pages that will suppress your plugin and display the newsbox is

Code: Select all

#CMSimple $news = "Name_of_page_containing_your_news";#
Hope this helps
Frank Z.

Post Reply