[SOLVED] CGFeedMaker feed return link missing detailpage

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Slagar
Forum Members
Forum Members
Posts: 19
Joined: Sat May 10, 2008 11:42 am
Location: Auckland

[SOLVED] CGFeedMaker feed return link missing detailpage

Post 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?
Last edited by Slagar on Fri Jan 30, 2009 1:16 am, edited 1 time in total.
Slagar
Forum Members
Forum Members
Posts: 19
Joined: Sat May 10, 2008 11:42 am
Location: Auckland

Re: CGFeedMaker feed return link missing detailpage

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

Re: CGFeedMaker feed return link missing detailpage

Post by calguy1000 »

and how are you calling {news} within your CGFeedmaker Feed template?
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.
Slagar
Forum Members
Forum Members
Posts: 19
Joined: Sat May 10, 2008 11:42 am
Location: Auckland

Re: CGFeedMaker feed return link missing detailpage

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

Re: CGFeedMaker feed return link missing detailpage

Post by calguy1000 »

change this as appropriate:

Code: Select all

 {news assign='junk'}
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.
Slagar
Forum Members
Forum Members
Posts: 19
Joined: Sat May 10, 2008 11:42 am
Location: Auckland

Re: CGFeedMaker feed return link missing detailpage

Post 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'}
Post Reply

Return to “Modules/Add-Ons”