Hi
I've installed CGFeedmaker and I've got it working fine for news - but I need to have it for our case studies as well
anyone know how to set it up for general page content, ie: when I add a new (non-news) page it updates the RSS feed...
Thanks
R
Create an RSS Feed for newly added pages (not news)
-
- New Member
- Posts: 4
- Joined: Fri Dec 21, 2007 10:32 am
Re: Create an RSS Feed for newly added pages (not news)
Try this:
rss feed template
stampaContent is a user defined tag with this code
rss feed template
Code: Select all
{* original rss feed template *}
<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
{* note: if you have not configured pretty urls or mod rewrite, the next line may fail when trying to validate the feed *}
<atom:link href="{$feed_url}" rel="self" type="application/rss+xml" />
<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} ({$admin_user->firstname} {$admin_user->lastname})</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 *}
{menu start_page="your_page_alias" assign='junk'}
{foreach from=$nodelist|@reverse_array item=node name=foo}
{if !$smarty.foreach.foo.last}
<item>
<title>{$node->menutext|cms_html_entity_decode}</title>
<link>{$node->url}</link>
<description>{stampaContent pagealias=$node->id property='content_en' limit_char='200'}</description>
<pubDate>{$node->modified|rfc_date}</pubDate>
<guid>{$node->url}</guid>
</item>
{/if}
{/foreach}
</channel>
</rss>
Code: Select all
$pagealias = $params['pagealias'];
$property = $params['property'];
$limit_char= $params['limit_char'];
global $gCms;
$manager =& $gCms->GetHierarchyManager();
$nodo =& $manager->sureGetNodeByAlias($pagealias);
if ($nodo != null)
{
$contentobj =& $nodo->GetContent();
$content = $contentobj->Show($property);
}
$content = strip_tags($content);
if($limit_char > 0){
echo substr($content,0,$limit_char)."...";
} else {
echo $content;
}
Re: Create an RSS Feed for newly added pages (not news)
I believe you can put it in the template with a call to just pages to get a feed...
Re: Create an RSS Feed for newly added pages (not news)
Hiya,
I too have been trying to implement this kinda thing. Basically I would like to create a "recent-updates" feed, so for whenever a page is updated/added.
I have tried this template/UDT and it just keeps returning an empty feed, Ive tried all sorts of things, but to no avail, so I am completely lost
Any help would be gratefully received!
Thanks
I too have been trying to implement this kinda thing. Basically I would like to create a "recent-updates" feed, so for whenever a page is updated/added.
I have tried this template/UDT and it just keeps returning an empty feed, Ive tried all sorts of things, but to no avail, so I am completely lost

Any help would be gratefully received!
Thanks