By glennr on
I want to have a different comment form title for two different node types, eg blog and products. I've tried a few things with box.tpl.php but at the moment, the best I can come up with is to use different comment settings for the two node types: 'Display on separate page' for the blog and 'Display below post or comments' for products. Then add this template.php snippet:
function mytheme_preprocess_box(&$vars, $hook) {
switch($vars['title']) {
case 'Post new comment':
$vars['title'] = t('Write a review');
break;
case 'Reply':
$vars['title'] = t('Post a comment');
}
}
But let's face it, that's a workaround, to be put it mildly. And it doesn't give me any flexibility, for example, to display the comment form below the blog post as I'd prefer.
Anyone got any ideas?
Comments
...............
...............
Anyone?
Has anyone figured this out?
+1
+1
Did it with a node_load :(
Had to accomplish this with a node_load() in the theme. Bummer, but since it's cached on the page anyway it's not so bad and the theme is kinda appropriate.
Definitely a lame point though.
Thanks, doublejosh
Thanks, doublejosh. That works nicely.