Page 1 of 1

Newsmodule and RSS: detailpage

Posted: Sat Jul 07, 2007 7:21 am
by curana
Hi,
Im using the News-Module with RSS and it works great. There is just one thing of beauty: When I click on a news inside my rss-reader, the detailed news is shown on the home-page of my website. I would prefer it to be on the "news"-page.

I know there is a parameter which can define inside the link where to open, but it seems not to work for a news I open via my rss-reader.

U hv an idea how that works? How can I make my detailed news be shown on the "news"-page?

Re: Newsmodule and RSS: detailpage

Posted: Sun Aug 26, 2007 8:52 pm
by ikatt
The News Module doesn't have a default returnid for the RSS-feed other than the page from which the {news}-tag is located, usually the frontpage/index. The returnid in RSS is therefore always the same as the content_id of that page, not the returnid which you may have defined in your {news}-tag. The RSS-feed URL is generated by News.module.php on line 148:

Code: Select all

$url = 
$config['root_url'].'/index.php?mact=News,cntnt01,rss&cntnt01showtemplate=false&cntnt01category='.rawurlencode($categories).'
&cntnt01number=20&cntnt01returnid='.$gCms->variables['content_id'];
I don't know how to change this in a dynamic way. The news module allows you to insert the {news}-tag multiple times on a page, using different templates and detailpages. This makes it (almost?) impossible to have a correct RSS-feed detailpage based on the detailpages defined in the tag(s), unless you always uses the same page to display the details.

My tip is to check out what your feed-URL is, and change the value of $returnid to match the content_id of the page you want to use, and add this URL to your Feed Auto-Discovery URL in Content > News > Options. Another solutions is to change the $returnid in either News.module.php or action.rss.php. Either way it isn't dynamic, and you have to stick to that URL/detailpage. The content_id of every page can be found in the pages overview in the admin-section.

Re: Newsmodule and RSS: detailpage

Posted: Sun Aug 26, 2007 9:17 pm
by calguy1000
Are you using the 'detailpage' param on your {news makerssbutton='1'} tag?

Re: Newsmodule and RSS: detailpage

Posted: Wed Aug 29, 2007 8:24 am
by halm
calguy1000 wrote: Are you using the 'detailpage' param on your {news makerssbutton='1'} tag?
I'm having the same problem, and just tried setting a detailpage="news" as you suggested. Doesn't work, though I'd think it would.

Re: Newsmodule and RSS: detailpage

Posted: Tue Sep 04, 2007 10:54 am
by halm
*bump*

Re: Newsmodule and RSS: detailpage

Posted: Tue Sep 04, 2007 6:23 pm
by Pierre M.
Hello,

what is your {news} tag without makerssbutton ?
what is your {news} tag with makerssbutton ?

do you have a page with an alias same as the one pointed to by detailpage ?
Which CMSms version are you using ? and Which News module ?

Where don't you see a returnid ?

Pierre M.

Re: Newsmodule and RSS: detailpage

Posted: Fri Sep 14, 2007 11:03 am
by halm
No answer from Curana. I'll pretend you were asking me ;)
Pierre M. wrote:what is your {news} tag without makerssbutton ?
what is your {news} tag with makerssbutton ?
{news summarytemplate="newsbar" number='5' detailpage='blog' moretext='read on -' }
{cms_module module='News' makerssbutton='true' number='10' detailpage='blog'}
Pierre M. wrote:do you have a page with an alias same as the one pointed to by detailpage ?
Yes. I see that the URLs generated in the summarytemplate all end with a /68/
(ie, http://domain.com/index.php/news/14/68/)
whereas the feed backlinks don't -
(http://domain.com/index.php/news/14/)

CMSms 1.1
News 2.3

Re: Newsmodule and RSS: detailpage

Posted: Fri Sep 14, 2007 4:48 pm
by Pierre M.
Hello,

back up files+database and try first to upgrade to 1.1.2+ and current stable News.

Then try :
{news summarytemplate='anohertemplate' number='5' detailpage='blog' moretext='nodash' }
{news number='5' detailpage='myalias' moretext='nodash' } and have a page named 'myalias'.
{news makerssbutton='true' number='10' detailpage='myalias'}

How do you read the feed backlinks ? Please show an sample and an example of what you would like.

Pierre M.

Re: Newsmodule and RSS: detailpage

Posted: Fri Sep 14, 2007 7:47 pm
by halm
Pierre M. wrote:How do you read the feed backlinks ? Please show an sample and an example of what you would like.
I get my feeds in Thunderbird, has the backlinks in clear view ;)
I just doublechecked that the /68/ in insite links equals detailpage="somepage". If I could add it to the feed urls, everything would be dandy.

Let me get back to you on that upgrade ...

Re: Newsmodule and RSS: detailpage

Posted: Fri Sep 14, 2007 10:00 pm
by Pierre M.
In News/action.rss.php it seems the returnid is managed.

In the default news template News/templates/rssfeed.tpl it seems it is unused :

Code: Select all

<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>{$sitename|escape}</title>
		<link>{$root_url}</link>
		<description>Current News entries</description>
		{foreach from=$items item=entry}
		<item>
			<title><![CDATA[{$entry->title}]]></title>
			<link>{$entry->link}</link>
			<guid>{$entry->link}</guid>
			<pubDate>{$entry->gmdate}</pubDate>
			<category><![CDATA[{$entry->category}]]></category>
			<description><![CDATA[{eval var=$entry->strippedsummary}
			{eval var=$entry->strippedcontent}]]></description>
		</item>
		{/foreach}
	</channel>
</rss>
What about adding something like {$entry->returnid} in the item ? Would it do the trick ?
No, I only get

Pierre M.

Re: Newsmodule and RSS: detailpage

Posted: Tue Apr 01, 2008 12:21 pm
by marties
Hello,

i ended up hardcoding my detail page at the end of the link and guid lines

{$entry->link}/51
{$entry->link}/51

if there is a generic way i would be very gladĀ  :)

Is it planned to include this parameter in the 2.0 release ?