Friends 1.x

Legacy documentation for Friends 1.x.

The Friends:Member_Of_Group tag is a simple function that determines whether or not the currently logged in user is a member of a group. It needs to know the group ID or name, so you would typically place this loop inside the Friends:Groups loop, or have it grab the group name or ID from the URI.

{exp:friends:member_of_group} content {/exp:friends:member_of_group}


The following parameters are available for use:



The Friends:Member_Of_Group tag will automatically grab the group ID or name from the URI if you have it prepended by group in the URI, but this parameter is available to use, should you be placing it within the Friends:Group loop.


The following conditionals are available for use:

if member_of_group

{if member_of_group == "y"}
    This user is a confirmed member of this group.

This conditional shows its contents if the currently logged in user is a confirmed member of the group. This conditional contains a value of either y (is confirmed member of group), or n (is NOT confirmed member of group).


The following code shows how this loop might look like in your template:


    <h3>Group: {friends_group_title}</h3>

{!-- Begin Member_Of_Group function --}

        {if member_of_group == "y"}
            <p>You are a member of this Group</p>
        {if member_of_group == "n"}
            <p>Would you like to Joing this Group?
                <a href="{path='friends/group_add'}/group/{friends_group_id}/">Click here!</a></p>

{!-- // End Member_Of_Group function --}