node body

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
webdrips's picture

CCK fields vs. $node->body and $node->teaser (high traffic site)

Hi all.

I recall from a presentation by Michelle Lauer (miche) during Drupalcon 2010, she indicated it's best to use a CCK textarea field for the node body to make it easier on themers.

However, in this case I will be the themer and I'm handing the site off to an experienced Drupaller to maintain the back end.

So what I wanted to open up for discussion here is: what other advantages or disadvantages are there to each approach?

My three primary concerns are as follows:

<

ol>

Read more
ollynevard's picture

Proposal for a module to build a flexible node body using text and media/assets

Hi guys, I've got an idea for a module and would like to put it to the community before I start work on it. The sort of feedback I'm after is:

  • How useful it would be
  • Are there are any existing modules I could use instead to avoid duplicating efforts.
  • Would it would be easier to help extend an existing module?
  • Potential pitfalls
  • Whether or not the idea is crazy, hence why it hasn't been implemented before.

Please correct me if any of the assumptions I have made are incorrect.

Read more
cwarden@xerus.org's picture

tokens in node body

What's the proper way to replace tokens within a node body?
I've created a simple module that implements hook_token_values and
hook_token_list, but to use my token within a node body, I've had to
implement hook_nodeapi, which doesn't seem right.

<?php
function mymodule_nodeapi(&$node, $op, $a3 = null, $a4 = null) {
   if (
$op == 'alter') {
     
$node->body = token_replace($node->body);
   }
}
?>

How about within a template? Is this discouraged?

<?= token_replace('[my-token]') ?>
Read more
Subscribe with RSS Syndicate content