Skip to end of metadata
Go to start of metadata

Overview

The {join-community} macro displays a link that allows a user to join or alter their community membership status. The link and its text will change depending on the user's current status, for example if they are already a member it will allow them to leave the community, etc.

Usage

{join-community}

Parameters

Parameter

Required

Default

Notes

Bubbles Version

default

(error)

Current Space

The space that contains the community to join/leave

1.1

join

(error)

"Join this %communiytypetitle% community"

The text to display for a join link

1.1

requestjoin

(error)

Request to join this %communitytypetitle% community

The text to display when a user can only request to join a community.

1.1

leave

(error)

"Leave this %communiytypetitle% community"

The text to display for a leave link

1.1

cancel

(error)

"Cancel request to join this %communiytypetitle% community"

The text to display for a cancel request to join link

1.1

refuse

(error)

"Refuse invitaton to join this %communiytypetitle% community"

The text to display for a refuse invitation to join link

1.1

accept

(error)

"Accept invitaton to join this %communiytypetitle% community"

The text to display for a accept invitation to join link

1.1

denied

(error)

"You were denied membership of this %communiytypetitle% community"

The text to display when a user has been denied membership

1.1

refused

(error)

"You have refused invitaton to join this %communiytypetitle% community"

The text to display when a user has refused an invitation to join

1.1

left

(error)

You have left this %communiytypetitle% community

The text to display when a user has left the community

1.1

rejoin

(error)

"re-join this community?"

The text to display for a rejoin community link. This link text is displayed after the "left" message (see above) and allows the user to rejoin a community they have left.

1.1

banned

(error)

"You have been banned from this community"

The text to display when the user has been banned from a community.

1.1

cannotjoin

(error)

"Community settings prevent you from joining this community"

The text to display when a user cannot join (or request to join) the community due to Private or Network Enrolment Settings.

1.1

cannotleave

(error)

"Community enrolment settings prevent you from leaving this community"

The text to display when a user is not permitted to leave a community due to Network Enrolment Settings.

1.1

The following placeholders can be used in any of the link text parameters to change the text based on the current community

Replacement Token

Description

%communiytypeyitle%

The community type title, as defined in Community Settings

%spacetitle%

The space title, as defined in Space Admin

If the user viewing the page does not have permission to view the community space that the macro is setup for no links will be displayed unless the user is invited to the community or they are already a member.

Examples

Basic Usage

To display a link allowing users to modify their membership status in the current community space, use the macro as follows:

{join-community}

The macro will output the relevant link and text depending on the user's current membership status and enrolment settings for the community.

Specifying a different community

By default the macro shows links relating to the current community space, however you can output links for a different community if desired by specifying a space key. For example, if you have a community with a space key of "FOO" you would use:

{join-community:FOO}

Note that if the user doesn't have "View" permissions on the FOO space, they won't see a link unless someone invites them to join that community space or they are already a member of the community space.

Customising the link text

The macro will output different links or messages depending on the user's membership status and community enrolment settings. You can customise the text shown in the various links or messages using the parameters listed at the top of the page. For example, to give a custom "Join" message you could use the following:

{join-community:join=Click here to join the %spacetitle% %communiytypetitle%}

Assuming the user isn't yet a member of the community, but has view access to the community space and the enrolment settings allow them to join, they'll see the join message with the two tokens replaced as applicable. For example, if the space title of the community is "Jumblatts" and the title of the community type is "Appreciation Society", they'd see:

Click here to join the Jumblatts Appreciation Society

Hints and Tips

If you expect to regularly use this macro with customised link text we suggest putting the markup in to a user macro or widget. This will allow you to centrally manage the link text customisations and have changes instantly applied site-wide when you change them. It will also make it much easier for community administrators to add the customised version of the join-community macro to their space, etc.