Hi,

I'd like to theme the feed page to show feed to users but without the regular 'table' view that is shows normally.

I would like for example to theme the feed page so that it looks like a regular node.

How could I theme not only the feed items but the feed itself?

Thanks

Comments

alex_b’s picture

do you want to break out the part that shows the table in leech_view() into a themable function theme_leech_feed_statistics() that takes the node and returns the table?


//... in leech_view()
$node->body = theme('leech_feed_statistics', $node);

function theme_leech_feed_statistics($node) {
  $rows = array();
  $rows[] = array(t('Source URL'), $node->leech->url);
  $rows[] = array(t('Last checked'), ($node->leech->checked ? t('%time ago', array('%time' => format_interval(time() -      $node->leech->checked))) : t('never')) );
  $rows[] = array(t('Time until next refresh'), ($node->leech->checked ? t('%time left', array('%time' =>   format_interval($node->leech->checked + $node->leech->refresh - time()))) : t('never')) );

  return theme('table', array(), $rows);
}
alex_b’s picture

... and post a patch ;) - watch out: check out DRUPAL-4-7 for patching!

alex_b’s picture

Status: Active » Closed (fixed)