Modified version to replace teaser with a cck field.

adresaklumea - December 13, 2007 - 15:38
Project:Similar Entries
Version:5.x-2.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

I'm trying to modify the include teaser to include a cck field.

    if ($teaser) {
      $items[] = '<div class="similar-title">'.
        l($content->title,
          'node/'.$node->nid,
          variable_get('similar_rel_nofollow', 0) ? array('rel' => 'nofollow') : NULL,
          NULL,
          NULL,
          NULL,
          true
        ) .
        '</div><div class="simlar-teaser">'. check_markup($content->teaser, $content->format, false) .'</div>';
    } else {

You codded: check_markup($content->teaser, $content->format, false)

I tried to change to check_markup($node->field_story_subtitle[0]['view'], $content->format, false)

or to

check_markup($content->field_story_subtitle[0]['view'], $content->format, false)

and nothing works. In php I'm a little noob.

Any ideas ?

#1

radune - January 8, 2008 - 18:34

That would be so useful - can someone please help us? (the php noobs?)

Thank you!
-Radu

#2

deekayen - June 18, 2009 - 02:09
Status:active» duplicate

#73084: Support new fields in Drupal core

 
 

Drupal is a registered trademark of Dries Buytaert.