By NIKS_Artreaktor on
DRUPAL 7
Please help to display/render in field.tpl - comments /comments_count of the node.
Hole part of comments and comment form that are in node.tpl
or plus separated comments and comments form.
Why i need this:
I want to move comments into field and change label of field (add comment count in lable). This is for Drupal Commerce.
If comments will be in in field - i can do other effects like to field - for example make it horizontal Tab and so on...
Thank you very much.
Comments
That's a very strange
That's a very strange approach I think. I wouldn't do that if I were you, although you can access node object via
$variables['element']['#object'].Try finding a better solution. Any presentation like Tabs can be easily done via CSS.
love, light n laughter
nothing strange :)
Why it strange? If we get comments in field - we can do with it everything like with field.
Yes, i can do it by css and so on... But comments always will be at the and of tabs list.
I can use Display node, and use module Field group - to hide comments in tab.
But i can't display count of comments in the label of field. And I already need 2 modules. But can use only "field group module" and field.tpl
Please can you write solution using $variables['element']['#object']
Or it too long to write?
Thanks.
www.ArtReaktor.com
Did you install devel.module?
Did you install devel.module? If so try putting, any one of below into your preprocess_field to find out available variables:
See more info http://api.drupal.org/api/function/theme_field/7
If you are working with any of field.tpl directly, you can see there are available variables such as:
Good luck.
love, light n laughter
Thank you for your time!
Thank you for your time!
www.ArtReaktor.com