Page 1 of 1
					
				news module ignore a different detailtemplate
				Posted: Tue Mar 22, 2016 12:30 pm
				by giapippo
				Hello
I am creating a website with version 1.11.13 
I have already created other sites but with previous versions
Now I have a problem with the news module
if you want to use a different template detail than the default
the system ignores my request and uses the default detail template
I use this code
{news category="articolo" summarytemplate="articolo_blog" detailtemplate="articolodettaglio" detailpage="notizie"}
I do not understand
thanks for your help
bye
			 
			
					
				Re: news module ignore a different detailtemplate
				Posted: Tue Mar 22, 2016 12:44 pm
				by velden
				Could you try to disable pretty urls (in config.php) and check if it works. 
Modules can't pass all parameters when using pretty urls.
			 
			
					
				Re: news module ignore a different detailtemplate
				Posted: Tue Mar 22, 2016 12:49 pm
				by giapippo
				thanks the problem are pretty urls 
but the pretty url are required for seo and other links
there is a solution?
Thanks for your help
			 
			
					
				Re: news module ignore a different detailtemplate
				Posted: Tue Mar 22, 2016 1:14 pm
				by velden
				You might take a look at the CGExtensions module's Smarty AddOn:
{cge_module_hint module=string ...}
This function plugin can be used to provide hints for module behavior if various parameters cannot be specified on the URL. I.e: In a situation when a site is configured to use pretty urls for SEO purposes it is often impossible to provide additional module parameters like a detailtemplate or sort order on a URL. This plugin can be used in page templates, GCBs or in a page specific way to give hints as to how modules should behave.
Note: Any parameters that are specified on the URL will override matching module hints. i.e: When using News and a detailtemplate parameter is specified on a News detail url, any detailtemplate hints will have no effect.
Note: In order to ensure proper behavior, module hints must be created before the {content} tag is executed in the CMSMS page template. Therefore they should (normally) be created very early in the page template process. An ideal location for page specifc hints is in the "Smarty data or logic that is specific to this page:" textarea on the editcontent form.
Example:
When using the CGBlog module, and pretty urls. You wish to display blog articles for a specific category on one page, and would like to use a non standard detail template to display the individual articles on a differernt page. I.e: perhaps on your "Sports" page you are calling CGBlog like: {CGBlog category=sports detailpage=sports_detail}. However, using pretty urls it is impossible to specify a detailtemplate on the links that will generate the detail views. The solution is to use the {cge_module_hint} tag on the sports_detail page to provide some hints as to how CGBlog should behave on that page.
When editing the sports_detail page on the options tab, in the textarea entitled "Smarty data or logic that is specific to this page:" you could enter a tag such as: {cge_module_hint module=CGBlog detailtemplate=sports}. Now when a user clicks on a link from the CGBlog display on your "sports" page he will be directed to the sports_detail page, and the CGBlog detail template entitled "sports" will be used to display the article.
    It is possible to specify multiple parameter hints to a single module in one call to this plugin.
    It is possible to call this module multiple times in a request to provide hints to different modules.
Usage:
{cge_module_hint module=CGBlog summarytemplate=something detailpage=home}
{cge_module_hint module=CGSmartImage noembed=1}
{cgerror [errorclass=string]}...{/cgerror}
Never used it myself though.
 
			
					
				Re: news module ignore a different detailtemplate
				Posted: Tue Mar 22, 2016 1:23 pm
				by giapippo
				Thanks
but I do not understand why a basic form that has always worked well can have such a heavy defect
Thanks for your help
			 
			
					
				Re: news module ignore a different detailtemplate
				Posted: Tue Mar 22, 2016 5:33 pm
				by paulbaker
				giapippo wrote:but I do not understand
Pretty URLs link: domain.com/news-article-about-weather
Default URLs include parameters for article number, templates to use etc.  More flexible.
By the way, version 1.11.13 is not the latest.  When developing a new site you should use the latest version of the core code, currently 1.12.1 (if you need access to old modules) or 2.1.2.
 
			
					
				Re: news module ignore a different detailtemplate
				Posted: Fri Mar 25, 2016 10:49 am
				by giapippo
				hello
I upgraded to version 1.12.1
but it still does not work
absurd
			 
			
					
				Re: news module ignore a different detailtemplate
				Posted: Fri Mar 25, 2016 11:09 am
				by giapippo
				you know what the latest version of the series 1 CMSMS where the news module works?
thanks
			 
			
					
				Re: news module ignore a different detailtemplate
				Posted: Fri Mar 25, 2016 12:15 pm
				by velden
				It probably never did work like you want it to work now. Though I'm not 100% sure. 
But test thoroughly on older versions whether you're doing the exact same thing.
			 
			
					
				Re: news module ignore a different detailtemplate
				Posted: Sat Mar 26, 2016 6:07 am
				by Jeff
				It isn't a bug or defect. I has been stated in the Help section as long as I know.