Wednesday 14 December 2011 3:28:01 pm
Hello Sebastiaan,
I suggest a custom implementation as the rss module does not help you here directly ... also simpler to implement I think without relying on the rss module (though you could try to trigger the creation of your feeds through it I imagine with enough work and a custom workflow event).
I've created similar rss feeds using custom extension module views (PHP) and /layout/set templates. Both have advantages and disadvantages ....
I hope this helps ...
Cheers,
Heath
Wednesday 14 December 2011 4:01:18 pm
For one site I did a custom edit handler for blogs, and called the following function from the 'publish function' (only for the first version of the blog object):
function createBlogRSS($object,$node,$rssName) { $userID = 14; $nodeID = $node->attribute( 'node_id' ); $db = eZDB::instance(); $db->begin(); $rssExport = eZRSSExport::create($userID); $rssExport->setAttribute( 'title', $object->attribute('name') ); $rssExport->setAttribute( 'access_url', $rssName ); $rssExport->setAttribute( 'url', "http://www.yourwebsite.com" ); $rssExport->setAttribute( 'rss_version', "2.0"); $rssExport->setAttribute( 'number_of_objects', 20 ); $rssExport->setAttribute( 'active', 1 ); $rssExport->setAttribute( 'status', 1 ); $rssExport->setAttribute( 'main_node_only', 0 ); $rssExport->store(); $rssExportID = $rssExport->attribute( 'id' ); $rssExportItem = eZRSSExportItem::create( $rssExportID ); $rssExportItem->setAttribute( 'class_id', 16 ); $rssExportItem->setAttribute( 'description', "bl_body_xmlb" ); $rssExportItem->setAttribute( 'source_node_id', $nodeID ); $rssExportItem->setAttribute( 'status', 1 ); $rssExportItem->setAttribute( 'subnodes', 1 ); $rssExportItem->setAttribute( 'title', "bl_title_txtl" ); $rssExportItem->store(); $db->commit(); return $rssName; }
Modified on Wednesday 14 December 2011 4:16:18 pm by Sebastiaan van der Vliet
You must be logged in to post messages in this topic!