Page 1 of 1
News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 5:13 pm
by weird0
Hi there I have a problem with the News Module I cant seem to fix on my own.
I have got two pages
page 1 is a summary page containing 3 posts
page 2 is a detailed page only containing 1 post
If I click on the read more link for message A on page 1, I get page 2 with message A in detail (exactly how I want to, the problem is if I click on the read more link for message B on page 1, I also get page 2 with message A in detail. I want it to be page 2 with message B in detail
the same should apply if I would click on message C etc.
I hope someone can help me fix this
P.S. I tried search and have read a lot of post about the news module but couldn find it
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 5:26 pm
by calguy1000
I just tried to reproduce your problem on my test site (I've been working with news of late, so I thought that anything could be possible, and should test).... but was not able to reproduce it.
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 5:38 pm
by weird0
forgive me but english is not my native language...
So what I want isn't possible ?
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 5:42 pm
by calguy1000
meaning I couldn't reproduce the problem you're having.
I have 2 posts in my summary page.
When I clicked on the more link of article 1 I get the details for article 1 in my detail page.... if I click on the more link for article 2, I get the details for article 2 in my detail page.
Which version of CMS are you using? have you tweaked news at all, or your summary templates?
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 5:53 pm
by weird0
using CMS Made Simple 1.0.6 "Niihau"
and yes I tweaked the summary template
for page 1 I used
Code: Select all
<!-- Start News Display Template -->
{foreach from=$items item=entry}
<div class="NewsSummary">
<h3><div class="NewsSummaryLink">{$entry->title}</div></h3>
<div class="NewsSummaryAuthor">
{if $entry->formatpostdate}
{if $entry->author}
Dit bericht is gepost door <b>{$entry->author}</b> op <b>{$entry->formatpostdate}</b></div>
{/if}
{/if}
{if $entry->summary}
<div class="NewsSummarySummary">
{eval var=$entry->summary}
</div>
<div class="NewsSummaryMorelink">
[{$entry->morelink}]
</div>
{else if $entry->content}
<div class="NewsSummaryContent">
{eval var=$entry->content}
</div>
{/if}
</div>
<br>
<br>
<br>
<hr>
{/foreach}
<!-- End News Display Template -->
and for page 2 I am using
Code: Select all
<!-- Start News Display Template -->
{foreach from=$items item=entry}
<div class="NewsSummary">
<h3><div class="NewsSummaryLink">{$entry->title}</div></h3>
<div class="NewsSummaryAuthor">
{if $entry->formatpostdate}
{if $entry->author}
Dit bericht is gepost door <b>{$entry->author}</b> op <b>{$entry->formatpostdate}</b></div>
{/if}
{/if}
{if $entry->summary}
<div class="NewsSummarySummary">
{eval var=$entry->summary}
{eval var=$entry->content}
</div>
{else if $entry->content}
<div class="NewsSummaryContent">
{eval var=$entry->content}
</div>
{/if}
</div>
<br>
<br>
<br>
<hr>
{/foreach}
<!-- End News Display Template -->
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 5:59 pm
by calguy1000
Okay, what are you using for {news...} tags on these pages?
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 6:02 pm
by weird0
for page 1
{news dateformat="%d %b %Y" number="3" moretext="Lees verder" detailpage="Nieuws"}
and for page 2
{news dateformat="%d %b %Y" number="1" summarytemplate="nieuws-details.tpl"}
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 6:08 pm
by calguy1000
Okay, I see....
On detail pages you don't need any content what-so-ever.....
the {content} teg is replaced by the news detail content.....
Is your news stuff in your default {content} block?
I'd try removing the news tag from page 2
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 6:51 pm
by weird0
still isn't working, tried some other things too but no succes
on the detail pages I have no other content then the neccesary html
If I remove the {news} from page 2 there, it will show no news at all
I know I am doing something wrong but I have no idea what.
is there a possibility to see your code/how you did it, so I can compare it with mine ?
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 7:11 pm
by calguy1000
On my News test page (I'm using an svn copy of news with numerous tweaks that I'm about to commit). I have (among other things)
{news number=4 detailpage='details'}
Now on the page with the alias 'details' I have one content area, and the content in that page is:
"this is default content"
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 7:50 pm
by Dr.CSS
He has a news tag on his detail page which is not needed if like most ppl. it's used as the detail page which is/can be a diff. template used for a page that is set as Content Type: News and not shown in the menu...
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 7:53 pm
by calguy1000
I'm using two content pages. My summary page has the tag described above (among other news tags).... my detail page just has some dummy content in the {content} area.
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 9:14 pm
by weird0
problem solved
both pages should be of content type in order to let it work proparly
on page 1 just use the news tag with detailpage
and page 2 the detail page the {content} tag
other ways work, but only if you want more then 1 post on the detail page
thnks for the help callguy & mark
Re: News Module: how to select wich messages on the detail page
Posted: Sun Aug 12, 2007 9:19 pm
by calguy1000
Just another reason that the News content type should be removed.