How to use Vanilla Sub-communities
Getting started with Sub-communities
Once the sub-communities plugin is enabled in your account*, you will notice the following in the sidebar of your Dashboard:
If it’s there, don’t click it yet! We have a bit of planning to do before we assign our categories to become sub-communities. We first need to create the categories we want. We’ll also need to envision how we want to split them up. We have you covered on the basics of creating categories here, but let’s revisit it a bit for the unique scenario of splitting these into their own sub-communities.
Creating Root Categories With Sub-communities
To create categories, click on the link “Categories” right above the “Subcommunities” link in “Forum Settings”. You will be brought to a settings page to start adding categories.
Using our example from above, let’s create the categories for Acme Widgets. The first step is to create the main categories. So in this case, we create “Acme Widgets USA” and we change the url slug to be whatever we want. It will default to the Category name, but just click the edit button to change it to whatever is appropriate for you to remember. The url slug will not really matter now as you will be configuring the url slug when you assign your root category to a sub-community.
Next, we can create the root category for Mexico (in Spanish). You can modify the slug to be for language, country or both. Once again it does not matter at this point, so long as it’s clear for you.
Creating Child Categories With Sub-communities
Let’s now create the child-categories for each language, and change the url slug to fit the appropriate country/language combo. Once you create all the categories you need, drag and drop them into the order that makes the most sense.
As you can see from the above, you want to nest categories under the appropriate root categories. In this case “General Discussion” and “FAQ” are now child categories of “Acme Widgets USA”. When finished, it will look something like the following:
The slug-names of the URL will matter as they will be used and visible in sub-communities. You’ll want to choose SEO appropriate names and slugs. Don’t worry if you need to change it later, though, as categories can be edited at any time, and members will be redirected to the new name/url-slug.
Roles & Permission on Categories With Sub-communities
Also, just like when you create categories normally, you can create custom permissions for each category by selecting “This category has custom permissions” at any time.
The one thing to note with permissions in sub-communities is that the standard Vanilla roles (such as Moderator, Member and Admin) are global for the community. This means they will have access to all the categories. If you wanted a member to only have moderator ability in a specific language, you would need to create a new role (via roles and permissions) and assign the appropriate permission. Once you have the new role created, you can then add the specific users you want to have access to it. If you are using SSO or API to create users, you can automate this process.
The following is an example of steps to give someone a moderation ability to the Spanish language section of Acme Widgets.
- Edit the category to use custom permissions.
- Create the new role, by going to the User sub-menu, and selecting “Roles & Permissions”. Click “Add Role”.
- Give the role an appropriate name and select the appropriate permissions in this category. Make sure you select the permissions you think makes sense. Below is an example:
- Pay special attention to the permissions you give them specifically to the category you wish them to have an ability in. If you select the “Moderation” privilege, they will have access to the moderator queue and other dashboard items, such as messages. If you want to have them focus on content, leave this unchecked.
- Add a user to this role by searching for them in the user table and adding this ability. (With SSO or API, you could make this automated).
It’s Locale time!
By default, everything in Vanilla is in English. If you are using sub-communities for specific languages, it’s time to turn on the appropriate locales.
Let’s enable Spanish for Mexico, simple by finding it in the list and enabling it. (Make sure not to use the (Deprecated) translations in order to use the most up-to-date translations.)
Locales will translate the menu options and the terminology in Vanilla. This preference will be remembered at the individual level. You can also set the default for your community at the top of the locale setting pages.
Please note, the locale will not translate the content of the community, this is the point of sub-communities! Members will converse in their native tongues in the appropriate category, and thus you will eventually have content in that language.
With the appropriate categories created and locales turned on, it’s now time to assign the sub-communities!
Assigning Categories to Sub-communities.
You can now head over to the sub-communities settings, found under “Forum Settings”. You will see the following:
Click on “Add Subcommunity” and add the appropriate info to turn your categories into a sub-community.
Do the same for each root category. The following is an example for the Spanish language category
Remember, all of this is editable at anytime and additional sub-communities can also be added as you need. Once done, the list will look like so.
The child categories you created will now be in these folders if they are clicked.
You can always rename your child categories slug at any time if you decide you need a clearer name (as we mentioned earlier). Members will be redirected to the new address without you needing to do anything.
Sub-communities Selection
If you head to the front-end of the community, you will only see the default sub-community. You’ll need a bit of theming to make it easier for members to easily switch between sub-communities. You can do this by adding the following module to the customize theme (HTML) section of your community where you want the nav option to show:
{module name="SubcommunityToggleModule" Style="select" LabelField="Name"}
You can also modify the options of how the nav links show :
- Style: You can use “nav” for links or “select” to create a dropdown.
- LabelField: You can use “Name”, “LocaleDisplayName” or “LocaleShortName”.
The most common place will be in the Nav bar or above {asset name="Panel"}.
The following example is in the Navbar:
It will look like this on the front-end:
Theming your Sub-communities
You can theme each of the sub-communities categories individually using the category classes and CSS.
We actually, have a whole article just for theming categories with CSS here. If you need to add something else, like HTML specific to a certain sub-community, please get into contact with your customer success manager.
Questions or issues?
Your customer success manager is happy to help with any questions. If you’re not yet a customer and would like to learn more about sub-communities, please talk to a member of our team.
*Please note, Sub-communities is available on the Enterprise (2014) plan or above. If it’s not already on for you, and you’d like to make use of them, please contact your Customer Success Manager.