CMS Development

DM2
Miembro

Filtering Blog articles and other pages

resolver

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 Me gusta
2 Soluciones aceptadas
albertsg
Solución
Guía

Filtering Blog articles and other pages

resolver

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


Book time with me

You can also connect with me on LinkedIn



Ver la solución en mensaje original publicado

DM2
Solución
Miembro

Filtering Blog articles and other pages

resolver

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.

Ver la solución en mensaje original publicado

0 Me gusta
6 Respuestas 6
webdew
Guía | Partner nivel Diamond
Guía | Partner nivel Diamond

Filtering Blog articles and other pages

resolver

Hi @DM2 ,

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

0 Me gusta
albertsg
Solución
Guía

Filtering Blog articles and other pages

resolver

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


Book time with me

You can also connect with me on LinkedIn



Graham_USMC
Colaborador | Partner
Colaborador | Partner

Filtering Blog articles and other pages

resolver

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

0 Me gusta
albertsg
Guía

Filtering Blog articles and other pages

resolver

@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


Book time with me

You can also connect with me on LinkedIn



Graham_USMC
Colaborador | Partner
Colaborador | Partner

Filtering Blog articles and other pages

resolver

Thank you very much - I appreciate the help greatly!

0 Me gusta
DM2
Solución
Miembro

Filtering Blog articles and other pages

resolver

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 Me gusta