contao/import — Issue #2158: HOOK for adding Feeds to the Header
Author: importer
Created: 2011-11-29 19:08:20+00:00
State: open
Labels: Accepted, Feature, framework

To add custom feeds to the current page layout, one of the ways is to use the generatePage HOOK

$GLOBALS['TL_HOOKS']['generatePage'][] = array('Gallery', 'addFeedsToLayout');

and then insert a TL_HEAD array element.

A slicker nicer way would be to use a simple hook just below the newsfeeds and calendarfeeds in PageRegular.php

$GLOBALS['TL_HOOKS']['customFeeds'][] = array('Gallery', 'addFeedsToLayout');

This would be easier than using $GLOBALS['TL_RSS'][], as this would still require a hook to insert the strings into the array using the generatePage HOOK anyway.

Sorry, if this is already in a german ticket, but I don't speak German, so its tricky to search these day, as it seems there is more tickets in German than English -- also not a great thing to make Contao more useful world-wide.

Related issues: #2220

--- _Originally created by thyon on June 19th, 2010, at 05:07pm (ID 2158)_