<img height="1" width="1" style="display:none" src="https://q.quora.com/_/ad/10b616b60fad4a51aa023ade12476783/pixel?tag=ViewContent&amp;noscript=1">

How to use Vanilla Sub-communities

Posted by Adrian Speyer on Mar 18, 2016 8:30:34 AM
Find me on:

8 minute read

Sub-communities- Let's Each Category Be Unique, like a plate of your favourite cakes (2)

Do you have a community where you need to support different languages? Or maybe you want to handle different product brands to have their own small community? The sub-communities plugin was made just for you in these scenarios!

Sub-communities leverage Vanilla's category structure to create different forums (or sub-communities) within one Vanilla instance. Let's look at an example of a (fake) company called Acme Widgets, which needs multi-language categories. The set-up will look like the following

  • Acme Widgets (USA - English)
    • General discussion
    • FAQ
    • Acme Product Support Widget 1
    • Acme Product Support Widget 2
  • Acme Widgets (Mexico - Spanish)
    • General discussion
    • FAQ
    • Acme Product Support Widget 1
    • Acme Product Support Widget 2
  • Acme Widgets (France - French)
    • General discussion
    • FAQ
    • Acme Product Support Widget 1
    • Acme Product Support Widget 2

So, for example, the highest level, or root categories (in this case, languages) function as the sub-community dividers. The categories below (FAQ for example) will be child categories of the root (language) category.

While this looks like a normal category tree structure, when you access the root category (or in this case the language category of this fake company), you would only see discussions and comments from within the specified root category. This extends beyond category-specific pages to include the recent discussions page which can also be filtered by the root category chosen.

While our primary example that follows will be about language, some creative customers have been using sub-communities for separating different brands into smaller communities. This has worked well when they wanted a clear demarcation between them, and didn't feel there was a cross-over in the audiences.

Let's now go learn how to create some 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:

forum-settings-subs

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.

Categories_-_acmewidgets

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.

Edit_Category2

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.

Add_Category2

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.

organize-categories

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:

Categories_-_acmewidgets_3

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.

Add_Category_-_pemissions

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".

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:

role_1a role_2

  • 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).

Users

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.

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_-_acmewidgets

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.

Locales-2

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:

Sites_-_acmewidgets

Click on "Add Subcommunity" and add the appropriate info to turn your categories into a sub-community.

locales-subcommunity

Do the same for each root category. The following is an example for the Spanish language category

espanol_subcomm

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.

sites-subcomm

The child categories you created will now be in these folders if they are clicked.

Discusión_General_-_acmewidgets.png

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:

Customize_Theme_-_acmewidgets

It will look like this on the front-end:

dropdown-subcommunities

Theming your Sub-communities 

You can theme each of the sub-communities categories individually using the category classes and CSS.

Acme_Widgets_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.

Topics: Product

Related posts

Subscribe to the Community Corner Newsletter and get expert insight and analysis on how to get the most out of your online community every Friday.

Search this blog

Recent Posts

community playbook

Have an Article for Vanilla's Blog?

Send us an email to pr@vanillaforums.com with your topic idea and we'll circle back with our publishing guidelines.