CMS Development

DM2
メンバー

Filtering Blog articles and other pages

解決

hi there

 

I am looking to create a summary page that will contain links to blog articles and also links to other website pages. 

 

I know how to filter blog articles by tag and I would like to apply the same principle to other (non blog) website pages. Is it possible to tag other pages in some way?

 

Essentially I want to be able to select a tag and display filtered content for both blog articles and other pages. Perhaps I could apply a notional 'tag' to the website pages via a custom module and access that variable in the summary page? 

 

Would be very grateful for any steer here!😀

0 いいね!
2件の承認済みベストアンサー
albertsg
解決策
ガイド役

Filtering Blog articles and other pages

解決

Hello @DM2

 

I believe a custom module would be the best solution in this case. We did a similar thing and basically using a custom module with a dropdown with different options allowed us to filter posts/pages according to what we needed/wanted.

All you will need to do is access the module property of your page/blog and use that variable while filtering your content.

 

Hope it helps!

 

 



Did my answer help you? Mark it as a solution

You also connect with me on LinkedIn or Twitter

元の投稿で解決策を見る

DM2
解決策
メンバー

Filtering Blog articles and other pages

解決

Thank you, yes you're right. I have started to achieve this by using a custom module that adds in the non blog content - and through a choice field for each item - applies a class / or classes that are in line with the blog tags. divs with classes applied can then be filtered accordingly.

 

I think the concept of 'page tagging' though could be a really useful development.

元の投稿で解決策を見る

0 いいね!
6件の返信
webdew
ガイド役 | Diamond Partner
ガイド役 | Diamond Partner

Filtering Blog articles and other pages

解決

Hi @DM2 ,

Try teh below code. It will work for blogs only:

0 いいね!
albertsg
解決策
ガイド役

Filtering Blog articles and other pages

解決

Hello @DM2

 

I believe a custom module would be the best solution in this case. We did a similar thing and basically using a custom module with a dropdown with different options allowed us to filter posts/pages according to what we needed/wanted.

All you will need to do is access the module property of your page/blog and use that variable while filtering your content.

 

Hope it helps!

 

 



Did my answer help you? Mark it as a solution

You also connect with me on LinkedIn or Twitter

Graham_USMC
投稿者 | Solutions Partner
投稿者 | Solutions Partner

Filtering Blog articles and other pages

解決

Is there a link to your "similar thing" or a thread about this solution? 

0 いいね!
albertsg
ガイド役

Filtering Blog articles and other pages

解決

@Graham_USMC in the following article you can see how to access a blog post module (and its variables) from another template (a listing page for example). While the article talks about something else, this implementation is used so you can get the idea and how to implement it: https://dev.to/albertsg/having-multiple-blog-post-templates-in-hubspot-10i1 



Did my answer help you? Mark it as a solution

You also connect with me on LinkedIn or Twitter

Graham_USMC
投稿者 | Solutions Partner
投稿者 | Solutions Partner

Filtering Blog articles and other pages

解決

Thank you very much - I appreciate the help greatly!

0 いいね!
DM2
解決策
メンバー

Filtering Blog articles and other pages

解決

Thank you, yes you're right. I have started to achieve this by using a custom module that adds in the non blog content - and through a choice field for each item - applies a class / or classes that are in line with the blog tags. divs with classes applied can then be filtered accordingly.

 

I think the concept of 'page tagging' though could be a really useful development.

0 いいね!