Newsmodule and RSS: detailpage

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
curana
Forum Members
Forum Members
Posts: 44
Joined: Sun Jan 21, 2007 5:53 pm

Newsmodule and RSS: detailpage

Post 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?
ikatt

Re: Newsmodule and RSS: detailpage

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

Re: Newsmodule and RSS: detailpage

Post by calguy1000 »

Are you using the 'detailpage' param on your {news makerssbutton='1'} tag?
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.
halm
Forum Members
Forum Members
Posts: 103
Joined: Mon Jun 11, 2007 12:52 pm
Location: Malmö, Sweden

Re: Newsmodule and RSS: detailpage

Post 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.
"One measures a circle, beginning anywhere" - Charles Fort
halm
Forum Members
Forum Members
Posts: 103
Joined: Mon Jun 11, 2007 12:52 pm
Location: Malmö, Sweden

Re: Newsmodule and RSS: detailpage

Post by halm »

*bump*
"One measures a circle, beginning anywhere" - Charles Fort
Pierre M.

Re: Newsmodule and RSS: detailpage

Post 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.
halm
Forum Members
Forum Members
Posts: 103
Joined: Mon Jun 11, 2007 12:52 pm
Location: Malmö, Sweden

Re: Newsmodule and RSS: detailpage

Post 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
"One measures a circle, beginning anywhere" - Charles Fort
Pierre M.

Re: Newsmodule and RSS: detailpage

Post 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.
halm
Forum Members
Forum Members
Posts: 103
Joined: Mon Jun 11, 2007 12:52 pm
Location: Malmö, Sweden

Re: Newsmodule and RSS: detailpage

Post 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 ...
"One measures a circle, beginning anywhere" - Charles Fort
Pierre M.

Re: Newsmodule and RSS: detailpage

Post 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.
marties
Forum Members
Forum Members
Posts: 34
Joined: Tue Jan 11, 2005 11:22 am
Location: France

Re: Newsmodule and RSS: detailpage

Post 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 ?
Post Reply

Return to “CMSMS Core”