CMS Development

YChuskit
Participant | Elite Partner
Participant | Elite Partner

create a filter

Hello,

I want to create a tag based blog filter. which will filter me blogs which are hosted on other website .I installed one module from market place assets which fetches those blogs from that website, now the issue is it is showing me all the blogs that are there in that blog website. I have added tags to my blogs using hubspot like virtual reality ,augmented reality. i tried using tag filter module , but it is not working , for example ,if i choose virtual reality from the tag filter, along with the taged blog it is also showing me the blogs which has the word virtual reality in it . i dont want that , i want to create a filter that will only show me blogs of selected tag.

0 Upvotes
3 Replies 3
webdew
Guide | Diamond Partner
Guide | Diamond Partner

create a filter

Hi @YChuskit ,

You need to use Hubspot blog listing code and blog-tag-filter module in same template then it will work.
Means the code of blog listing and blog-tag-filter should be in same template and then you can select template for partiular blog .
You can use Blog listing and blog-tag-filter module , its available in hubspot design manager themes you can clone this module and add in your blog listing template.


Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

0 Upvotes
webdew
Guide | Diamond Partner
Guide | Diamond Partner

create a filter

Hi @YChuskit ,

For Blog Filter use default blog filter module after cloning do change the content as per your requirements:-

 

webdew_0-1637750714122.png

 

 

On the right hand side select the choice field as shown below

webdew_1-1637750714207.png

 

Select between  tag, month , author on the basis of which the content will be displayed

webdew_2-1637750713303.png

 

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

0 Upvotes
Oezcan
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

create a filter

Hello @YChuskit ,

 

try one of this code:

This one is Blog specific

 

{% set blog_tags = blog_tags('module.blog_field', 250) %}
<ul>
{% for tag in blog_tags %}
<li>{{tag}}</li>
{% endfor %}
</ul>

 

 

 

<ul>
{% for tag in content.tag_list %}
<li>
<a class="OUR-TAG-CLASS" href="{{ blog_tag_url(group.id, tag.slug) }}">
{{ tag.name }} 
</a>
</li>
{% endfor %}
</ul>

 


I hope it will help.

 

Best Regards,

Özcan

Oezcan Eser Signature