Fixing jumbled output in content templates

Leo pointed out a problem with his recent site directory listing for LibSite.org: the input filters weren't taking effect. Due to not RTFM or just plain not being careful, I had configured a Contemplate template for the site listings improperly. I found the solution at http://drupal.org/node/85225: use the 'view' key instead of the 'value' key in the $field variable, since the 'view' value is the only one run through the filters:

print $field_content[0]['view']

instead of

print $field_content[0]['value']

in the templates. Worked like a charm.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.