node body
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.
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]') ?>

