APIs & Integrations

crewneck
Member

Display content in blog post depending on set Topic

Hi,

We want to display a certain content depending on what the individual blog post topic is set as.

So if the blog post is set to “Finance” it should display a custom module named FinanceModule for example.

How do we achieve this?

I’ve set an individual blog post to Finance an tried

    {% if topic 'Finance' %}
        <h1>
            News!
        </h1>
    {% endif %}
0 Upvotes
1 Reply 1
crewneck
Member

Display content in blog post depending on set Topic

Found a solution. Works well

     {% if 'TOPIC-NAME-HERE' in content.topic_list|map('name') %}
    <h1>YOUR TOPIC-SPECIFIC CONTENT HERE</h1>
    {% endif %}
0 Upvotes