Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By puleddu on
In the comment preview page a copy of the node content is reported at the bottom of the comment preview. How can I disable the node render and leave only the comment preview + comment from?
Is it possible?
Comments
CSS did the trick but a
CSS did the trick but a display:hidden; directive is not the best way. Data is hidden but present!
Still waiting for an answer.
CSS vs. template.php
Well my solution for your problem would be overriding the theme_comment_preview($comment, $links = array(), $visible = 1) function using phptemplate engine. So you create in your /themes/yourtheme/template.php function
and after that you create your own template for displaying comment_preview so you create in your /themes/yourtheme/comment_preview.tpl.php template for displaying the comment preview.
All variables $comment, $links, $visible are available within the scope of comment_preview.tpl.php.
Thats very short way to give you the clue how you should thing about your solution, parhaps there is 10 other ways to accomplished this issue, if you need more details feel free to contact me maciej.perlinski@meant4.com.
--
kindest regards
Maciej Perlinski
http://www.meant4.com
http://www.meant4.pl
maciej.perlinski@meant4.com
Exactly what I was looking
Exactly what I was looking for!
Thank you Mac.
The community driven project advantages=)
--
kindest regards
Maciej Perlinski
http://www.meant4.com
http://www.meant4.pl
maciej.perlinski@meant4.com
but ...
I don't think this code actually works, even though it should. If it doesn't, try:
http://drupal.org/node/82998