Created
March 12, 2012 20:23
-
-
Save philspitler/2024451 to your computer and use it in GitHub Desktop.
Add Link for full article to Drupal feed item generated through the feeds module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>> | |
| <?php print render($title_prefix); ?> | |
| <?php if (!$page): ?> | |
| <h2<?php print $title_attributes; ?>> | |
| <a href="<?php print $node_url; ?>"><?php print $title; ?></a> | |
| </h2> | |
| <?php endif; ?> | |
| <?php print render($title_suffix); ?> | |
| <?php if ($display_submitted): ?> | |
| <div class="meta submitted"> | |
| <?php print $user_picture; ?> | |
| <?php print $submitted; ?> | |
| </div> | |
| <?php endif; ?> | |
| <div class="content clearfix"<?php print $content_attributes; ?>> | |
| <?php | |
| // We hide the comments and links now so that we can render them later. | |
| hide($content['comments']); | |
| hide($content['links']); | |
| print render($content); | |
| ?> | |
| </div> | |
| <?php | |
| // Remove the "Add new comment" link on the teaser page or if the comment | |
| // form is being displayed on the same page. | |
| if ($teaser || !empty($content['comments']['comment_form'])) { | |
| unset($content['links']['comment']['#links']['comment-add']); | |
| } | |
| // Only display the wrapper div if there are links. | |
| $links = render($content['links']); | |
| if ($links): | |
| ?> | |
| <div class="link-wrapper"> | |
| <?php print $links; ?> | |
| </div> | |
| <?php endif; ?> | |
| <?php if ($page): ?> | |
| <?php | |
| $result = feeds_item_info_load('node', $node->nid); | |
| ?> | |
| <a href="<?php print $result->url; ?>" target="_blank">Read Full Article</a> | |
| <?php endif; ?> | |
| <?php print render($content['comments']); ?> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment