Hello fellow CMSMS'ers
I hope this is the right place to ask. Recently it has become a bit difficult to understand all the forum categories.
Well. I have a news page on a website where not many news will be posted. So we will deactivate the news page if nothing important is going on. My idea is to also have a newsbox showing on the start page, but only if the news page is active.
I thought I could simply make a tag on the start page, like this: {menu includeprefix="news" template="newsbox"} and make a {news} tag in the "newsbox" menu template. But it did not work, so obviously a menu template has no access to {news}.
Maybe I need to put in a smarty code on the startpage, which works like: if menu item "news" == active, show {news summarytemplate="x"}
But I know not enough about smarty. Can someone help me with this? Or other recommendations?
Thank you,
Thom
[solved] show newsbox only if news page is active
[solved] show newsbox only if news page is active
Last edited by thomahawk on Mon Dec 24, 2012 8:24 am, edited 1 time in total.
Re: show newsbox only if news page is active
Does this help? http://docs.cmsmadesimple.org/layout/ex ... e-template
Look into the sidebar gcb
Rolf
Look into the sidebar gcb
Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: show newsbox only if news page is active
Hi Rolf
Thanks for the suggestion. Basically it seems, that sidebar thing includes a tag who shows news if there are any (active). It is not really what I wanted. I prefer editors can control all news display just by activate/deactivate the news page, instead of deactivate each news article.
But I finally found a solution. I made the frontpage newsbox a Global Content Block, it calls an article summary template
{news number='4' summarytemplate='news-liste'}
I created a menu template which only calls for the Global Content Block.
Finally on the front page, I call the menu template for one single page entry
{menu template="newsbox" items="news"}
It works. When I deactivate the "News" page, the news box also disappears. CMS made simple is just so great!
Thank you
Thomas
Thanks for the suggestion. Basically it seems, that sidebar thing includes a tag who shows news if there are any (active). It is not really what I wanted. I prefer editors can control all news display just by activate/deactivate the news page, instead of deactivate each news article.
But I finally found a solution. I made the frontpage newsbox a Global Content Block, it calls an article summary template
{news number='4' summarytemplate='news-liste'}
I created a menu template which only calls for the Global Content Block.
Finally on the front page, I call the menu template for one single page entry
{menu template="newsbox" items="news"}
It works. When I deactivate the "News" page, the news box also disappears. CMS made simple is just so great!
Thank you
Thomas


