Two different templates for news details!

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
darchik
New Member
New Member
Posts: 4
Joined: Fri Jan 12, 2018 1:15 pm

Two different templates for news details!

Post by darchik »

Hello!
News module: Can't customize custom template for news details.
What am I doing wrong?

Example

{news category=Way summarytemplate="NewsSummaryWay" summarypage='trips' detailtemplate="NewsDetailWay" detailpage='trips'}

1. summary template - works, detailpage - works!
2. detail template - doesn't work! ((

I have two sections on the site: news and travel. These are different categories of news.
For the site news, I already use other templates for the summary display and for the news detail. News templates are installed by default and work fine.


Thanks for the help!
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1627
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Two different templates for news details!

Post by DIGI3 »

I think it's to do with the parameter not being passed when using pretty urls. In your summary template detail page(s), you could try using {cms_module_hint} in the Smarty data field to set the appropriate detailtemplate - see https://docs.cmsmadesimple.org/tags/cms ... odule_hint
Not getting the answer you need? CMSMS support options
(M)
Forum Members
Forum Members
Posts: 118
Joined: Tue Mar 18, 2008 11:43 pm

Re: Two different templates for news details!

Post by (M) »

Set some quotes around the detailtemplate name to get the correct detailtemplate:

Code: Select all

{cms_module_hint module=News detailtemplate='my_detail_template'}
With Pretty urls active.
Post Reply

Return to “CMSMS Core”