[support] Change node title when node is viewed.
Michel Morelli
michel at ziobuddalabs.it
Wed Jul 15 13:47:27 UTC 2009
Hi. I have a content type and I need to change the node's title when the
node is view-ed.
I have created a hook_nodeapi() function in one of my module:
function ostoni_admin_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'view':
if ($node->type == 'machine_new') {
dpm("ecco");
$node->title = t("Macchina nuova").": ".$node->title;
}
}
}
But when I view the node page I see the node's title without my
modification.
If I print the node's structure I see that node->title is changed.
Where is my error ?
I use acquia theme without modification.
M.
--
Michel 'ZioBudda' Morelli michel at ziobuddalabs.net
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 -- Fax: +39-0291390660
http://www.ziobudda.net ICQ: 58351764
http://www.ziobuddalabs.it Skype: zio_budda
http://www.ziodrupal.net MSN: michel at ziobuddalabs.it
JABBER: michel at ziobuddalabs.it
More information about the support
mailing list