I read through (most of) the thread on the French forum and this is because you want to use different news detail templates (and potentially different News detail pages) for different categories of News.
Well, I need to tell you that:
a: This question has been asked and answered many times on our forum, it does not only apply to News but to almost every other module that supports summary/detail views.
b: There is no bug. News is not built out of the box to handle this.
Here is why it is not a bug:
- The News module is capable of displaying a summary of news articles in many ways (different categories, page limits, sort orders, by author, etc.).
- When creating a summary view you can specify a detailpage parameter to use for all links to individual articles coming from that summary view. (does not apply when using SLUG's).
- When using News SLUG's you must specify a single detail page. There is a preference in the news module for this. This is because there is no detail page value on the URL itself to parse out.
- The module allows you to specify (per summary call) that detail links from this summary view should be dispayed on this page. This applies when NOT using slugs. The url is like "news/<pageid>/<articleid>/title-text"
- The module allows you to specify (per summary call) the detail template to use for all detail views coming from this summary view. This applies when NOT using slugs.
- You can create multiple different summary views on different pages (or even the same page). There is a great deal of flexibility in the module. But you can't have everything...... You can't have flexibility AND a single canonical URL for an article.
- If slugs are NOT used {news detailpage=home}{news detailpage=about} would generate two different canonical URL's for the same article (because you specified the detailpage parameter differently)... it is your responsibility to manage this.
i.e: if you dont' care about SEO, you could use {news category=foo detailpage=childcat}{news category=parentcat detailpage=bar}. Which would give you two different detail pages (and therefore potentially two different page templates) depending upon the category.
When not using slugs: This URL: News/22/55/some-news-article.html/d,footemplate
and This URL: News/22/55/some-news-article.html and this URL:
News/25/55/foo-bar.html all point to the same article (55) and therefore will result in duplicate content issues with google. because they are displaying the same data.
The first URL is just a different type of ugly URL than the normal ?cntnt01detailtemplate=footemplate stuff.
You can test this out... even when using slugs. You need to know the ID of any visible content page, AND the id of a valid news article then enter a URL Like <site>/News/<pageid>/<articleid>/some-junk.html it'll work. And you can change the page id or the "some-junk" stuff all you want. When a slug is entered for that article (and you haven't made any other changes). The canonical URL will use the slug.
The 'detailtemplate' parameter (in the summary view) is perhaps our biggest mistake. Although it certainly may have correct uses (can't think of any right now); for what you want, it is not the proper thing to use. If you want a custom display of some data based on the data itself (author, category, dates, depending on whether it has images or not, or the value of some custom field, etc) then the best place to make those decisions is in the detail template itself. Just put logic into your detail template.
Most of us would never think of putting logic in a summary template that says 'if the article author is 'fred' use a different detail template. We would put that display logic into the detail view itself. Then why would we do it for categories. It is best left to the detail view.
i.e:
{if $news_category == 'foo'} .... {else} ... {/if} {* pseudocode *}
is exactly the same type of decision as:
{if $news_image != ''} <!-- display image on left, summary on right --> {else} <!-- display summary across whole row --> {/if} {* pseudocode *}
or
{if $news_author == 'fred'}<!-- this guy is special, display a start with his profile -->{/if}
You can also use smarty logic and the {include} tag to include other templates so that your primary logic occurs in one template, and a nice... clean template does the display. i.e: something like:
{* My default News detail template *}
{if $news_category == 'foo'}
{include file='module_db_tpl:News;foo_category_detail'}
{else}
{include file='module_db_tpl:News;standard_detail'}
{/if}
Woot! I think I've just convinced myself to drop the whole detailtemplate parameter stuff from the summary view in News for CMSMS 2.1