By paul555 on
Hi all. I want to make a block which will appear in every group of my site containing some links regarding the group. The links i want to display are
og/users/%/list
and
node/add/%/add_member .
I notice that the argument is the node id of the current group. I don't know php and i imagine that i need to make a link like this
<?php print l("Add group member","og/users"nid of the current group"add_memeber"); ?>.
Can anyone please tell me how to achieve this? Thanks in advance.
Comments
Are you aware that og come
Are you aware that og come with blocks, one of them includes those links.
Thank you for your answer. I
Thank you for your answer. I know that og has some blocks with many links including those i want. I just want to make a navigation block with some other links pointing to some paths and the two links regarding the groups i mention above. Is this possible?
I believe this will
I believe this will work
I think you may use og_get_group_context
I think that og_determine_context(); is already being called on og_init(); that means that is called on every request. And og_inits() set the group context with the function og_set_group_context in a static variable, so you can actually retrieve the context using og_get_group_context, which is cheaper than og_determine_context.
Bottom line, to get the group context you should use og_get_group_context:
For OG 1.x
For OG 1.x Drupal7: