CMS Made Simple Forums
https://forum.cmsmadesimple.org/

News detail template parameter being ignored
https://forum.cmsmadesimple.org/viewtopic.php?f=7&t=79134
Page 1 of 1

Author:  cjcollen [ Wed Sep 26, 2018 6:18 pm ]
Post subject:  News detail template parameter being ignored

I have 2 news categories - general and fundraising. I have 2 content pages, News and Fundraising.

The Default page for Detail View Settings for News module in Site Admin is set to News.

On my News page, this is the News tag:
{News summarytemplate="site-news-summary" detailtemplate="site-news-detail" moretext="Read the full article" category="general" number="3"}

This works as expected and probably don't need to specify the summarytemplate and detailtemplate items as these values are the defaults, anyway.

On my Fundraising page, this is the News tag:
{News summarytemplate="site-news-summary" detailtemplate="site-news-fundraising-detail" moretext="Read the full article" category="fundraising" number="3"}

I have a different detail template for the fundraising news articles because I want different breadcrumb navigation.

But when I click on a fundraising article in the summary, it is the default detail template (i.e. site-news-detail) that is being pulled in to display the fundraising article. So, my breadcrumb navigation is wrong for this.

What am I missing with the detailtemplate parameter in the News tag?

System info:
Cms Version: 2.2.8

Installed Modules:

AdminSearch: 1.0.4
CGBetterForms: 1.5
CGExtensions: 1.61.1
CMSContentManager: 1.1.6
Captcha: 1.0
CmsJobManager: 0.1.3
CustomGS: 3.2
DesignManager: 1.1.4
FileManager: 1.6.7
FilePicker: 1.0.3
Gallery: 2.3.2
MenuManager: 1.50.3
MicroTiny: 2.2.2
ModuleManager: 2.1.4
Navigator: 1.0.9
News: 2.51.4
Search: 1.51.5
SitemapMgr: 1.5.3
TinyMCE: 3.2-beta5


Config Information:

php_memory_limit:
max_upload_size: 2000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: UTC
permissive_smarty: true

Author:  DIGI3 [ Wed Sep 26, 2018 9:14 pm ]
Post subject:  Re: News detail template parameter being ignored

I think you can only use detailtemplate when you're actually using the detail action. To suggest a detailtemplate from a summary template, take a look at cms_module_hint in the tags help, or cge_module_hint in the CGExtensions help.

Author:  cjcollen [ Thu Sep 27, 2018 1:32 pm ]
Post subject:  Re: News detail template parameter being ignored

I have tried both cms_module_hint and cge_module_hint options but to no avail.

I even set up a child page under Fundraising. So the Fundraising parent page has
{cge_module_hint module=News detailpage=fundraising-article}
in the Smarty data field on Logic tab and
{News summarytemplate="site-news-summary" moretext="Read the full article" detailpage="fundraising-article" category="fundraising" number="3"}
in the Content field.

The Fundraising Article page has
{news action=detail detailtemplate="site-news-fundraising-detail"}
in content field
and
{cge_module_hint module=News detailtemplate=site-news-fundraising-detail}
in Smarty data field.
It is just ignoring the alternative news detail template completely.

I just cannot work out the summary / detail logic with the News tag.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/