Display titles and teaser doesn't show themed teaser

troybthompson - February 28, 2009 - 23:57
Project:Similar By Terms
Version:6.x-1.18
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

When I select "Display titles and teaser" it shows the title as a link and the body field, but not what I have setup as the teaser in my .tpl.php. The code I have in my template is

<?php if ($teaser == 1) { ?>

<?php print $node->field_photo[0]['view'] ?>
<div class="views-field-title"><span class="field-content"><a href="<?php print $node_url ?>"><?php print $title; ?></a></span></div>


<?php } else { ?>
...

which works fine to show the teaser (photo with the title and link under it) in views, taxonomy pages, etc, but it's not being used with Similar By Terms. Am I misunderstanding how this feature works? Ideally it would just show the teasers rather than making a bulleted list out of them using this option since the title is included in the teaser template. Any thoughts appreciated.

#1

rmiddle - March 1, 2009 - 00:56

The teaser option is there for someone who doesn't want to override the template. I pass the entire node to similarterms.tpl.php. Just copy similarterms.tpl.php from the module folder to your template folder and change that. It should be documented well enough for you to figure out what to change.

Thanks
Robert

#2

rmiddle - March 1, 2009 - 00:55
Status:active» postponed (maintainer needs more info)

#3

troybthompson - March 1, 2009 - 15:42

Works great. Thanks! I was just confused by the word "teaser" in the option not meaning the actual teaser output.

#4

rmiddle - March 2, 2009 - 21:22
Status:postponed (maintainer needs more info)» fixed

I guess I need to update the wording a little to mean display the teaser text of the nodes.

Thanks
Robert

#5

System Message - March 16, 2009 - 21:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#6

giorgio79 - August 25, 2009 - 19:29
Category:bug report» feature request
Status:closed» active

Hello Robert,

Mind if I turn this into a feature request instead of a bug report? :) I was facing this issue for a while, as to why similarbyterms wont use my contemplate teaser... :)

 
 

Drupal is a registered trademark of Dries Buytaert.