View List Groups

Use this tag to display the groups on your site.  This also is used to display the info about a group on its details page.  This tag will automatically pick up the User Group’s url title or user_group_id from the URL to avoid having to pass it in (similar to the dynamic feature of the weblogs module).

{exp:user_groups:groups}{/exp:user_groups:groups} 

Table of Contents


Parameters

user_group_id

url_title

status

dyanmic

Accepts ‘on’ or ‘off’.  When set to ‘on’, this tag gets the url_title or user_group_id from the URL and looks it up.

owner_id

orderby

sort

limit

paginate

Accepts ‘both’, ‘top’, ‘bottom’

Variables

The following are available within this tag.

create_date format=”“

edit_date format=”“

user_group_id

name

description

url_title

user_group_image

owner_id

owner_screen_name

owner_username

owner_email

status

type

num_members

count

Conditionals

{if logged_in}

{if logged_out}

{if is_owner}

{if is_not_owner}

{if is_member}

{if is_not_member}

Example

{exp:user_groups:groups paginate="bottom" limit="2"}

    {if is_owner}You are the owner of this group 
or an admin<br/>{/if}
    {if is_not_owner}You are not the owner of this group
<br/>{/if}

    ID
{user_group_id}<br/>
    
Name: <a href="{path=">{name}</a><br/>
    
Description{description}<br/>
    
URL Title{url_title}<br/>
    
Status{status}<br/>
    
Type{type}<br/>
    
{if is_owner}Edit: <a href="{path=">Edit this group</a><br/>{/if}
    
    
# Members: {num_members}<br/>

{if user_group_image != ""}
Image
<br/>
<
img src="{user_group_image}" width="{image_width}" height="{image_height}" />
{/if}
   
    Owner ID
{owner_id}<br/>
    
Owner Screen Name{owner_screen_name}<br/>
    
Owner Username{owner_username}<br/>
    
Owner Email{owner_email}<br/>
    
Row #: {count}<br/>
{if logged_in}    
     {if is_not_member}Join link
:  <a href="{path=">Join this group</a>{/if}
    {if is_member}Leave link
:  <a href="{path=">Leave this group</a>{/if}
{
/if}
<br/><hr><br/>
{paginate}
<p>Page {current_page} of {total_pages} pages {pagination_links}</p>
{/paginate}
{
/exp:user_groups:groups} 

Category:User Groups -> Tags

Categories: