Page 1 of 1
Display the detail page for the news module
Posted: Thu Aug 10, 2006 3:48 pm
by whyggy
Hi,
Does somebody know how display the detail page of a news ?
In fact, the link "read more" is not able in the sample news.
When I click on this link, it always go on the same page !
So I don't know how activate the summary template AND the detail template.
If somebody has a solution ...
I think I have something to change with that :
Code: Select all
$onerow->morelink = $this->CreateLink($id, 'detail', $detailpage!=''?$detailpage:$returnid, $moretext, $sendtodetail, '', false, false, '', true, $prettyurl);
But I really don't know what !
Thx
Whyggy
Re: Display the detail page for the news module
Posted: Thu Aug 10, 2006 4:35 pm
by eleven3
I'm working on this same issue.
I know there are two templates to change, but both pages look the same.
There is a foreach loop, and I do not want that to be on my detail page. I eliminated it and still no luck.
Anyone?
Re: Display the detail page for the news module
Posted: Thu Aug 10, 2006 5:36 pm
by whyggy
and I tried to use the detailtemplate="template.tpl' but the same result.
Always the same summary page if I click on "read more" ...
Re: Display the detail page for the news module
Posted: Thu Aug 10, 2006 6:40 pm
by eleven3
I need to move on to another project, good luck.
If you happen to find a solution, I would love to hear it.
Thanks.
Re: Display the detail page for the news module
Posted: Thu Aug 10, 2006 11:03 pm
by Dr.CSS
What are your versions, CMSMS and news?
Re: Display the detail page for the news module
Posted: Thu Aug 17, 2006 5:32 pm
by eleven3
CMS_VERSION = "0.13"
CMS_VERSION_NAME = "Canary"
CMS_SCHEMA_VERSION = "19"
I am not sure what version of the News module. It was the one that came bundled with .13.
Thanks.
Re: Display the detail page for the news module
Posted: Thu Aug 17, 2006 6:09 pm
by Dr.CSS
The tag for news to use diff. templates...
{cms_module module='news' summarytemplate='sometemplate.tpl' detailtemplate='sometemplate.tpl'}
sometemplate.tpl = a new template(s) that you made and put in the template folder in News module on your server, it has to be named whatevernameyouwant.tpl and the name has to be in the tag call as whatevernameyouwant.tpl.
You can use the same template for each or any combo, detail for summary and summary for detail etc. .
Re: Display the detail page for the news module
Posted: Thu Aug 17, 2006 6:37 pm
by eleven3
Thanks for the help, I will give it a try.
Re: Display the detail page for the news module
Posted: Thu Aug 17, 2006 6:49 pm
by eleven3
It's not working for some reason. I click on the link to drill down and it takes me to a page that looks the same as the page I clicked from.
Here is the code I am using in my template:
{cms_module module='news' summarytemplate='summary.tpl' detailtemplate='details.tpl'}
I put both summary.tpl and details.tpl in the folder you specified.
Here is the code for summary.tpl :
{foreach from=$items item=entry}
{$entry->titlelink}
{$entry->summary}
{/foreach}
Here is the code for details.tpl
{$entry->titlelink}{$entry->formatpostdate}
{eval var=$entry->content}
Thanks for the help, I really appreciate it.
Re: Display the detail page for the news module
Posted: Wed Sep 06, 2006 8:01 pm
by eleven3
Anyone?
Re: Display the detail page for the news module
Posted: Wed Sep 06, 2006 8:35 pm
by Dr.CSS
If you are trying to use a diff. page for displaying the News Detail then you need a new page that is set to not show in menu with the tag for news being..
{cms_module module='news' summarytemplate='details.tpl'}
Your first page news tag will be...
{cms_module module='news' summarytemplate='summary.tpl' detailpage='pagealias'}
page alias is on the options tab of edit content page so when you make the new page you can have newsdetail in the alias, it only takes whole words or under score separated words news_detail, and your tag will have detailpage="newsdetail"
{cms_module module='news' summarytemplate='summary.tpl' detailpage='newsdetail'}
NOTE: I use single quotes in mine and it works fine...