CMS Development

Ek_alexandra
Member

Custom blog topic page

Hi!

I have different blog topics on our website and Hubspot always creates a new page for each topic . Example: www.website.com/blog/topic/example_topic

 

I want to create a different Rich Text module for each page. How do I do it? Now I can only edit the blog listing page.

 

Thank you!

0 Upvotes
1 Reply 1
Jsum
Key Advisor

Custom blog topic page

@Ek_alexandra,

 

All variations of the blog listing page are the same page. The data on the page is all that changes. You can't "edit" the listing page, as in the listing page cannot be access by the page editor.

 

It seams like you are wanting to add a blurb to the page specific to the filtered topic. There is a variable in HubL:

{{ topic }}

which is empty of on the regular listing page but filled with the slug of the topic if filtering by topic. I think the best you could do is create condition:

{% if topic == "topic-1-slug" %}
    <p>blurb for topic 1</p>
{% elif topic == "topic-2-slug %}
    <p>blurb for topic 2</p>
{% elif topic == "etc." %}
    <p>blurb for etc.</p>
{% endif %}

where you would have to manually plug in a condition for the slug of each topic then add your blurb right in the editor. You could use a rich text module but the listing page isn't editable so there is no point.

0 Upvotes