Skip to end of metadata
Go to start of metadata

Overview

The {my-communities} macro displays a list of communities that a given user belongs to.

Usage

{my-communities}

If there are no communities matching the parameters, or the viewing user doesn't have permission to view any of the communities returned, the macro will not output anything unless the none parameter is specified.

Parameters

Parameter

Required

Default

Notes

Bubbles Version

default

(error)

@creator

The username of the user for which community membership needs to be displayed:

  • username – the username of the person to list communities for
  • @self – the currently logged in user
  • @creator – the user that created the current page (default)
  • @owner – the user that created the space

1.1

showLogo

(error)

true

Controls the display of the space/community logo in the list

1.1

showTitle

(error)

true

Display the community title.

1.1

showDescription

(error)

true

Display the community/space description

1.1

titleLength

(error)

no limit

Truncate long community titles to x characters

1.1

communityType

(error)

no filter

Optionally filter the list to communities of a specific type (specified by the community type ID) or communities that both the logged in user and displayed user are members of:

  • communityTypeID – specify a valid community type ID to list communities of that type which the user is a member of
  • @commonMembership – list communities that both the target user (as specified by default parameter) and the currently logged in user are both members of.

1.1

showCommonMembership

(error)

true

Controls the display of a note for each community alerting the currently logged in user that they are also a member of the community.

1.1

showControls

(error)

true

Controls the display of community links such as "View members", "Invite" and "Leave" next to the community for the currently logged in user. Community Admins will also get notification if there are any outstanding invite or join requests for the listed communities.

1.1

showRole

(error)

true

Displays a note letting the logged in user know if they are an admin user of the community. (This may be expanded to display other roles within the community in a future release.)

1.1

sort

(error)

none

The order that the communities are returned in:

  • title - Sort by community title
  • date - Sort by community creation date

1.1

none

(error)

 

The text to display when the user is not a member of any communities.

1.1

display

(error)

default

control how the macro displays its content

  • default - the default macro display
  • menu - a simple list display for use in theme builder menus.

1.5.2

Examples

Display all communities the page creator is a member of

{my-communities}

Hide community space logos

By default the community space logos will be displayed, you can turn them off as follows:

{my-communities:showLogo=false}

Truncating or hiding community space titles

By default the full title will be shown, you can truncate it (useful if some communities have insanely long titles) as follows:

{my-communities:titleLength=20}

Or you can completely hide titles (useful if you just want to show community space logos) as follows:

{my-communities:showTitle=false}

Hiding community descriptions

The community description is taken directly from the Space Description (which can be edited in Space Admin). If you don't want to display descriptions, use the following:

{my-communities:showDescription=false}

Filtering to specific community types or communities the logged in user is also a member of

You can filter the list of communities to a specific Community Types, for example if you have a community type of "FOO" you could filter the list to only communities of that type as follows:

{my-communities:communityType=FOO}

Alternatively, you can filter the list so that it only shows communities that the user viewing the list is also a member of:

{my-communities:communityType=@commonMembership}

If the community list is already displaying the communities for the logged in user (eg. if they are the creator of the page or the @self mode is enabled) then the list will not be filtered.

Indicating common community membership

Communities that the user is a member of will be indicated in the list of communities. You can disable this feature as follows:

{my-communities:showCommonMembership=false}

Message to display when no matching communities are found

{my-communities:none=No communities were found}

Communities for a different user

If you want to show the communities for someone with a user name of "fred", use:

{my-communities:fred}

If you always want to display communities for the currently logged in user, use:

{my-communities:@self}

Or for the person who created the space in which the macro is used:

{my-communities:@owner}