4 20, 2021 12:39 PM
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!😀
解決済! 解決策の投稿を見る。
4 21, 2021 8:03 AM
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!
4 21, 2021 12:12 PM
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.
4 22, 2021 6:32 AM
Hi @DM2 ,
Try teh below code. It will work for blogs only:
4 21, 2021 8:03 AM
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!
3 23, 2022 10:34 AM
Is there a link to your "similar thing" or a thread about this solution?
3 23, 2022 12:05 PM
@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
3 23, 2022 3:22 PM
Thank you very much - I appreciate the help greatly!
4 21, 2021 12:12 PM
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.