Page 1 of 1

[SOLVED] CGFeedMaker feed return link missing detailpage

Posted: Thu Jan 29, 2009 3:40 pm
by Slagar
I have CGFeedMaker 1.0.4.

I have a mild problem with my News feed.
The feed itself seems to work fine except for one thing: when I click on a link from the feed, to view a News item, CGFeedMaker does not supply the detailpage attribute. This results in viewing the news item, but with the default sample template and without any styles applied to it.

As an example, when I'm viewing the detailed view of a News item [correctly], the address bar might say:

Code: Select all

index.php?mact=News,cntnt01,detail,0&cntnt01articleid=12&cntnt01origid=115&cntnt01detailtemplate=newsdetail&cntnt01returnid=115
But when I go to the feed, and click on the link to view that same news item, it returns:

Code: Select all

index.php?mact=News,cntnt01,detail,0&cntnt01articleid=12&cntnt01returnid=115
So this displays the correct news item, but with the wrong detailtemplate.

I have stated in the settings that the "Use this page for links:" dropdown and the "Feed links:" textfield both point to the page that has my News on it. Am I doing something wrong, or is this a bug?

Re: CGFeedMaker feed return link missing detailpage

Posted: Thu Jan 29, 2009 3:58 pm
by Slagar
Okay, I did a little playing around - I think this is a bug in CGFeedMaker.

The detailtemplate I used is not the default News detail template - which is why I noticed it when it reverted back to the default one. Changing the desired template to the default made it work, but it doesn't change the fact that CGFeedMaker didn't return the detailtemplate variable correctly.
This means if you were to have multiple feeds on your site, your users could only see one style (the default) - possibly making your other feeds look funny ;)

Re: CGFeedMaker feed return link missing detailpage

Posted: Thu Jan 29, 2009 4:16 pm
by calguy1000
and how are you calling {news} within your CGFeedmaker Feed template?

Re: CGFeedMaker feed return link missing detailpage

Posted: Thu Jan 29, 2009 5:05 pm
by Slagar
Hmm, I'm just using what seems to be the default:

Code: Select all

{* original rss feed template *}
<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>{$feed.title}</title>
    {if isset($feed.link) && !empty($feed.link)}<link>{$feed.link}</link>{/if}
    {if isset($feed.description) && !empty($feed.description)}<description>{$feed.description}</description>{/if}
    {if isset($feed.copyright) && !empty($feed.copyright)}<copyright>{$feed.copyright}</copyright>{/if}
    {if isset($generator)}<generator>{$generator}</generator>{/if}
    {if isset($feed.managing_editor) && !empty($feed.managing_editor)}<managingEditor>{$feed.managing_editor}</managingEditor>{/if}
    {if isset($admin_email)}<webMaster>{$admin_email}</webMaster>{/if}
    {if isset($feed.image) && !empty($feed.image)}
      <image>
	{if isset($feed.description) && !empty($feed.description)}<description>{$feed.description}</description>{/if}
        {if isset($feed.link) && !empty($feed.link)}<link>{$feed.link}</link>{/if}
        <title>{$feed.title}</title>
        <url>{$file_location}/{$feed.image}</url>
      </image>
    {/if}

    {* an example of how to create a feed from a call to the news module *}
    {* you can use any smarty variable that is available in the news summary template *}
    {* you can substitute this logic with output from any module that supports a summary
       view, or possibly get artistic and mix output from different modules *}
    {news assign='junk'}
    {foreach from=$items item='entry'}
    <item>
      <title>{$entry->title}</title>
      <link>{$entry->moreurl}</link>
      <description>{if isset($entry->summary)}{$entry->summary|strip_tags|summarize:40}{else}{$entry->content|strip_tags|summarize:40}{/if}</description>
      <pubDate>{$entry->postdate|cms_date_format:"%a, %d %b %Y %H:%M:%S %Z"}</pubDate>
      <guid>{$entry->moreurl}</guid>
    </item>
    {/foreach}
  </channel>
</rss>

If there's something wrong there that I can fix, I'm not sure what it is. Any help would be great :)

Re: CGFeedMaker feed return link missing detailpage

Posted: Thu Jan 29, 2009 5:14 pm
by calguy1000
change this as appropriate:

Code: Select all

 {news assign='junk'}

Re: CGFeedMaker feed return link missing detailpage

Posted: Fri Jan 30, 2009 1:14 am
by Slagar
Ahhh d'oh!
It was bound to be something obvious :D

Thanks Calguy! That worked like a charm :)

I simply changed it to:

Code: Select all

{news assign='junk' detailtemplate='newsdetail'}