I'm trying to add a class to the H2 tag that gets created in the group view, but copying node-og-group-post.tpl.php to my theme folder and making the change there doesn't seem to work. If I make the change directly in sites/all/modules/og/theme/node-og-group-post.tpl.php it works fine. Am I doing something wrong or is this a problem?
Comments
Comment #1
moshe weitzman commentedYou are clearing cache after the copy and rename?
Comment #2
Saoirse1916 commentedSorry for the delay -- yes, I've cleared the cache. I got a node-contenttype.tpl.php working so I know my clearing is successful.
Comment #3
jrabeemer commentedDo you have node.tpl.php in your theme folder?
Comment #4
Saoirse1916 commentedNo, I don't -- is that necessary?
Comment #5
jrabeemer commentedTry it. See if that makes a difference.
Comment #6
ajayg commentedI have seen this exact same problem. And yes I have node.tpl.php in my theme directoy. I tried everything from clearing the cache, restarted apache to rebooting the system with no luck.
I found the same workaround. I created multiple template files for each of the type of content OG enabled in the group. So created templates like node-group_contenttype1.tpl.php, node-group_contenttype2.tpl.php etc and individually modified with the required change. But just overriding with a generic template node-og-group-post.tpl.php did not work as reported in the defect.
I stumbled upon this in OG 6.x-1.1 so it has been there for a while. Sorry Should have reported it immediately.
Comment #7
agupta commentedI am also trying same thing.
I have a content type say contenttype1 as group post. i want to customize its view so i created node-contenttype1.tpl.php.
but its not working. I have tries same for other content types also(such as blog) and that works fine.
Wondering what is the issue.
Comment #8
ajayg commentedlook at issue #287298: Overriding node-og-group.tpl.php specially comment #17. Removing "/theme" from that path may resolve this issue. Verify and let us know here.
Comment #9
jzornig commentedPutting a copy of node.tpl.php in my theme folder fixed this issue for me.
Comment #10
the55 commentedadding the node.tpl.php worked for me.
my theme is a sub-theme. i simply copied in the parent theme's node.tpl.php
thanks.
Comment #12
PixelClever commentedI'm seeing a variation of this same bug in the 6x-2.1 release. In my case the node.tpl.php file in my theme folder is getting overridden by node-og-group-post.tpl.php even though the node.tpl.php is in the actual theme folder and the node-og-group-post.tpl.php is only in the module folder. To get around the issue I had to add a copy of node-og-group-post.tpl.php into the theme folder and have it load the node.tpl.php from inside that tpl.
What's really strange about this it doesn't happen universally with all content types.
P.S. I did clear all the caches several times.
Comment #13
krueschi commentedI have stumbled upon a variation of this problem.
The override of the first nodetype that is a group post. But if I create a second nodetype that should serve a different kind of data as og group post I'm not able to override the template file. I've tried several naming conventions
but none of them works.
Caches were cleared many times.
Did I miss something?
[UPDATE]
Yes, I missed something!
In my special theme files there were no "real" node-[nodetype].tpl.php versions. Instead of unsing the plain tpl files I used node-[nodetype]-body.tpl.php for a different theming and THIS doesn't work.
When I restart with clean template files I realize that the override works as follows with og group posts (og 6.x-2.x):
Hope that this helps someone out there.
Comment #14
ajayg commentedcan we close this , then as "works as designed"?
Comment #15
Grayside commentedSounds like the bug is resolved. It would be great if someone could document this.