function recipe_preprocess_node in Recipe 6
1 call to recipe_preprocess_node()
File
- ./
recipe.module, line 1346 - recipe.module - share recipes
Code
function recipe_preprocess_node(&$variables) {
// Return immediately if this node is not a recipe or if this is a teaser (teaser doesn't use special recipe fields).
// This gets called for all node types.
if ($variables['node']->type != 'recipe' || $variables['teaser']) {
return;
}
// Links at the bottom of the node view need to have the __yield__ placeholder updated with the current dynamic yield.
$variables['links'] = str_replace('__yield__', $variables['node']->yield, $variables['links']);
}