I am retrieving the original link from the data that feedapi passes to node.tpl.php via the link hook - but I would like some additional data.

I suspect maybe I do this in template.php ? If so, I was wondering if you have sample handy of how to do it.

I am wondering if it would be more efficient or easlier to hack link_hook in feedapi and add more data to the links?

Thanks for any help,
D.

Comments

alex_b’s picture

Status: Active » Postponed (maintainer needs more info)

What data would you like to have accessible in node.tpl.php ?

Rob T’s picture

I want the title of the feed item to link to the original article.

My feed items are saved as "feed_items" nodes. I duplicated my node.tpl.php and created a node-feed_items.tpl.php, but I can"t figure out what to replace "$node_url" with in the following snippet...

  <?php if ($title) { ?>
      <h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2>
  <?php }; ?>

The original article's data comes through just after this with the $links call, but I'm having no luck with the myriad of variables I've tried.

Any suggestions would be appreciated.

momper’s picture

hello rob t

i hope, i understand you the right way - try this

<?php if ($title) { ?>
      <h2 class="title"><a href="<?php print $node->links['feedapi_original']['href']; ?>"><?php print $title?></a></h2>
<?php }; ?>

greetings momper

Rob T’s picture

That worked! Thanks so much, momper.

alex_b’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)