Extras - Community Posting

Enable category references for posts

If you want to reference posts to another CMS collection to more effectively organize posts into different categories / topics, publications, etc. we offer an extra feature to enable this. Through this feature you can create individual pages for each category collection (via collection template pages) and list every post relevant to each category / topic.

When community members create a new post they will be able to choose the relevant category / topic for their post. Our app will then automatically connect the relevant category / CMS items for the newly created post via the reference field.

Video Tutorial

Adapting template categories

If you installed our app via the template installation, below is quick tutorial for how to adapt the pre-installed categories. Be sure to check out the video tutorial for instructions on how to add a second reference collection.

⚠️ Common error - mismatched slugs ⚠️

Make sure the values in the new post form's select input are identical to the slugs in your reference collection - otherwise, this feature will not work. Below is an example of proper select input choice configuration:

Copying the slug from the topics' CMS item
Pasting the slug to the value input for it's respective select input choice

Template pages for reference collections

To create pages to show posts for a certain reference collection, be sure to follow this tutorial for adding a collection list element to the template page for your referenced collections. Once created you can add a filter like the example below to only show posts for current collection.

Community Posting From The Category Page

Users can add community posts directly to specific topics or categories by placing the post form on the CMS collection template page itself. This eliminates the need to direct users to a separate static page where they would have to manually select a category from a dropdown menu.

To implement this, simply copy the community post form component and paste it onto your collection template page (such as your topic or category template). Then, add a custom attribute to the form with "sparks-prefill-ref-1" as the attribute name and your collection's slug dynamic field as the value. See below an example:

Note that this functionality only works when there is a select input for the topic / category on the form. However, you can hide this input - just avoid deleting it!

// Optional: Add this CSS to your project's custom code section