Hy!
I have one question about some hooks.
I want to manually output a comments from my own node template file called: node--forumpost.tpl.php.
In hook "mymodule_preprocess_comment_wrapper" I added and changed some values from comments array and if I just render the $content["comments"], then every change can be seen normally.
But if I don't render them with render function, but output them manually from the template file node--forumpost.tpl.php with normal foreach loop, I don't see my attributes added to it in array path $content["comments"]["comments"][$key]["comment_body"]["#object"] because I think that Hook is executed too late.
So hooks "mymodule_preprocess_comment_wrapper" and also "mymodule_preprocess_comment" can get me the list of proper comments, but I can't change the data with these hooks, because i think it's not executed before outputing the node thing.
Thanks
Comments
Please show:
Please show:
1) Your code
2) The current output
3) The desired output
Thanks for quick answer.
Thanks for quick answer.
The hook:
I go through the comments and add the property picturePath. In the end I can see the proper picturePath from $variables set.
Then in the node--forumpost.tpl.php I vardump this variable:
And there is no picturePath.
This is the output where picturePath is missing.
http://laravel.io/bin/9vb7M
Thanks
I also tried mymodule
I also tried mymodule_preprocess_comment hook for each comment seperate. And it also doesn't work.