News detail template parameter being ignored

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
cjcollen
Forum Members
Forum Members
Posts: 36
Joined: Sat Aug 04, 2018 4:20 pm
Location: Shropshire, UK

News detail template parameter being ignored

Post by cjcollen »

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
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1621
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: News detail template parameter being ignored

Post by DIGI3 »

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.
Not getting the answer you need? CMSMS support options
cjcollen
Forum Members
Forum Members
Posts: 36
Joined: Sat Aug 04, 2018 4:20 pm
Location: Shropshire, UK

Re: News detail template parameter being ignored

Post by cjcollen »

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.
mcalvet
New Member
New Member
Posts: 2
Joined: Thu Oct 27, 2016 12:02 pm

Re: News detail template parameter being ignored

Post by mcalvet »

Hello, I was having the same problem in the News module and I managed to make it work without using "cms_module_hint" or "cge_module_hint" and continue using pretty URLs.

I figured out We just cannot define a page in the News module settings. The option "Default page to use for detail views" must remain as None.

So simple!
Locked

Return to “Modules/Add-Ons”