What node template file is used?
I'm trying to add a "like" feature to a specific content type within my Drupal Commons install. I'm using the Flag module, and all works fine except for when I try to display the number of "likes" on a particular node. I've done this before on another site by adding this code (http://drupal.org/node/305086#flag-counts) within node.tpl.php.
This doesn't seem to work for Drupal Commons. In fact, I'm having trouble making any correlation between node.tpl.php and the page source that is rendered on a node page (this is "document" type specifically that I'm trying to add "likes" to). I'm (obviously) a novice when it comes to advanced theming, but this seems to defy the little bit that I do know.
Could someone point me to where I could get the flag count inserted into the node?
Thanks!


Comments
node templates
I had a similar problem recently, with no correlation between node.tpl.php and what was displayed on the page. In the end, I installed the devel and theme developer modules. WIth these modules, you can click on an element, and it tells you how it was themed. In my case,
profiles/drupal_commons/modules/contrib/og/theme/node-og-group-post.tpl.php was the relevant template to overwrite.
I'm having relate making any
I'm having relate making any reciprocity between machine.and the author arousal that is rendered on a convexity tender papers identify specifically that I'm trying to add likes to. testbells I'm a tiro when it comes to neo theming but this seems to oppose the younger bit that I do bed.
There's not a module that
There's not a module that does this? I would recommend searching for one and not changing the theme directly (you'll lose your customizations whenever you upgrade). A module would insert the count either into the node body or into the links portion of the node. If you have some Drupal development experience, I can point you in the right direction. Let me know if you can't find a contrib that already does this.
overwriting....
I didnt change the original file - I placed a copy in the theme directory and changed it there, so hopefully it won't be overwritten on an upgrade? I wanted to change the format of a node display - change the order around... can you recommend a better way of doing this?
Well, it should be
Well, it should be overwritten on an upgrade, and your copied file should be too, because the updated theme from an upgraded distribution will contain a node.tpl.php which will replace whatever you have in there. Also, whenever you upgrade a distribution, Drupal Core or Drupal Commons, you should replace the codebase with the upgraded version, not just merge the new code in; this ensures that old, no longer used files are removed.
Have you tried Display suite (http://drupal.org/project/ds) or Panels for this?
If you wanted to just move the fields around, you can do that via http://site.com/admin/content/node-type/(node type)/fields
Obviously having a bad day.....
Thanks for this. All I wanted to do was change the layout of the display on page "/tag/xxx". I simply wanted to move the tag list to the bottom, and label it as "Tags:".
The relevant template file is node_og_group_post.tpl.php, node.tpl.php is not involved at all. ( which I think is the point of the original post )
http://site.com/admin/content/node-type/(node type)/fields did not work for me - it changed the order of fields when I edited the node, but not when viewed on page "tag/xxx".
I investigated display suite - read al the pages on drupal.org, downloaded it, set the permissions, and got "no items found" on the Layout Overview page, with no clear instructions on what to do next..... obviously having a bad day...!
DS is a bit complicated. By
DS is a bit complicated. By itself, it does nothing; it's just an API. You'll need to downoad any needed modules that use it (Node display, User display, Comment display, etc).
Now you're saying that you want to modify the page layout on /tag/x. That's a taxonomy list, not a node; so I'm getting a little confused.
Perhaps try using the page manager which panels uses @ admin/build/pages. You can enable the page override of /taxonomy/term/x (which is the page at /tag/x). From there, you can build the page that shows on these pages. Page manager + panels can be very confusing, so if this is your first time using it, be sure you're doing it on a test site.
Let me know if that works, or if I can be of more help.
Hmm!
Thanks for this. I played around with admin/build/pages - yes it was complicated, but it was logical and intuitive to use. I enabled the taxomony template, and created a variant, but I couldn't get the page content to be what I wanted - the same list of taxonomy terms as before, but with a slightly different layout. ....