It certainly is – I haven’t had enough free time to juggle the example above into theme-based code (that works for me…!) yet though.
The $links variable is available from within _phptemplate_variables, so you can alter this in template.php in the case: 'node' bit of that. If you read this article that last bit will be clearer, if you don’t already know what I mean.
So, the code below should work in a similar fashion, although I’ve had mixed luck – it had otherwise been my intention to publish the full code for that method also.
<?php function _phptemplate_variables($hook, $vars = array()) { switch ($hook) { case 'node': foreach ($vars['node']->links as $module => $link) { if ($module == 'forward_links') { // alter stuff here } } } } ?>
It certainly is – I haven’t had enough free time to juggle the example above into theme-based code (that works for me…!) yet though.
The
$linksvariable is available from within _phptemplate_variables, so you can alter this in template.php in thecase: 'node'bit of that. If you read this article that last bit will be clearer, if you don’t already know what I mean.So, the code below should work in a similar fashion, although I’ve had mixed luck – it had otherwise been my intention to publish the full code for that method also.
<?phpfunction _phptemplate_variables($hook, $vars = array()) {
switch ($hook) {
case 'node':
foreach ($vars['node']->links as $module => $link) {
if ($module == 'forward_links') {
// alter stuff here
}
}
}
}
?>