News Module: how to select wich messages on the detail page

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
weird0

News Module: how to select wich messages on the detail page

Post 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
Last edited by weird0 on Sun Aug 12, 2007 5:17 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: News Module: how to select wich messages on the detail page

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
weird0

Re: News Module: how to select wich messages on the detail page

Post by weird0 »

forgive me but english is not my native language...

So what I want isn't possible ?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: News Module: how to select wich messages on the detail page

Post 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?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
weird0

Re: News Module: how to select wich messages on the detail page

Post 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 --> 
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: News Module: how to select wich messages on the detail page

Post by calguy1000 »

Okay, what are you using for {news...} tags on these pages?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
weird0

Re: News Module: how to select wich messages on the detail page

Post 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"}
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: News Module: how to select wich messages on the detail page

Post 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
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
weird0

Re: News Module: how to select wich messages on the detail page

Post 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 ?
Last edited by weird0 on Sun Aug 12, 2007 6:55 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: News Module: how to select wich messages on the detail page

Post 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"
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: News Module: how to select wich messages on the detail page

Post 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...
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: News Module: how to select wich messages on the detail page

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
weird0

Re: News Module: how to select wich messages on the detail page

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: News Module: how to select wich messages on the detail page

Post by calguy1000 »

Just another reason that the News content type should be removed.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “Modules/Add-Ons”