CMS Development

Philip_Marsh
Colaborador

Blog - Group content

resolver

Hi,

 

I'm trying to think about how I could approach this. I'm designing a new blog but I'm stumped on Grouping.

 

The issue I'm facing is that I can group content based on tags, and authors. Is there any way to group content further? to create multiple ways to group content

 

The idea is to have a series of articles grouped together. For example, "Day in the life of Steve" Series 1, "Day in the life of Brian" Series 2, and "Day in the life of Barry" Series 3. Clicking onto this takes you to a subcategory highlighting each article within that series

The reason I can't use tags is that tags will already be used to group those series. So Series 1 and 3 could be under 1 tag, while series 2 would be under another. 

 

Back end, this can be done using Campaign, but I'm not sure if you can use that to display them front of the website?

 

OR am I best-creating something custom using HubDB and Hubl?

0 Me gusta
2 Soluciones aceptadas
Gonzalo
Solución
Colaborador líder | Partner nivel Diamond
Colaborador líder | Partner nivel Diamond

Blog - Group content

resolver

You can go HubDB if you want to.
Although, I believe the fastest way is probably using a trick to "hide" topics/tags from the "normal" listing.

For example:

You say you are already using the tags to organize by series. So what you will need to do to create "subtags" would be to apply a custom format that will allow you later to hide from the main listing.

What I usually do is prefix all the subtopics (or hidden topics) with "_"
You will end up with a topic list like:
Main-serie

_sub-serie

 

Then in your blog template, you can filter out whenever you are displaying the list of topics to something like this:

{% for topic in content.topic_list %} 
  {% if not topic is string_startingwith "_" %}
    {# Display here your tag #}
    ....
  {% endif %}
{% endfor %}

This way you can keep some subtopics independently from the "main tags" (or series in your case). But keeping the default listing functionality provided by Hubspot, as you will have access to the topic page like url.com/blog/tag/_subtopic

If this answer helps you to solve your questions please mark it as a solution.

Thank you,


Gonzalo Torreras

HubSpot freelance developer

hola@gonzalotorreras.com
www.gonzalotorreras.com
Schedule a meeting

Ver la solución en mensaje original publicado

Gonzalo
Solución
Colaborador líder | Partner nivel Diamond
Colaborador líder | Partner nivel Diamond

Blog - Group content

resolver

Hi @Philip_Marsh ,

Sorry but, I dont fully understand what you mean with

 

(eng is not my main lang 🙂 )

Anyway, I believe the general idea is to keep it "hidden" from the frontend which is actually a valid thing I often do too.

For that you will only need to cut the first char of the string name when displaying the tag name (whereever you are doing it, so double check all the places!).
Common places to cut the it from:

Listings pages:

- Blog header (when in topic/tag listing)

- Maybe sidebar (in all listing pages)

 

- Post page:

- Topic/tag list in post page.

- Sidebar?

 

To keep a clean name in the frontend, when displaying the topic name you will want to do something like:

{{ topic.name|replace("_", "") }}

This method actually doesn't require to use the underscore, if you want to be safe you could use a more uncommon symbol for your client or concatenate twice like __ if you want to use normal underscore somewhere else.

The only place that will be visible is the slug of the URL, but that should be more than fine I believe.

 

As you can imagine this method is pretty easier to expand, like you could potentially create several levels of tags, or even combine different listings as categories (if contains your special char.) and normal tags for the common etc. 

 

For extra documentation, you can check all the available filter you can apply to strings here:

 

 

 

If this answer helps you to solve your questions please mark it as a solution.

Thank you,


Gonzalo Torreras

HubSpot freelance developer

hola@gonzalotorreras.com
www.gonzalotorreras.com
Schedule a meeting

Ver la solución en mensaje original publicado

6 Respuestas 6
Gonzalo
Solución
Colaborador líder | Partner nivel Diamond
Colaborador líder | Partner nivel Diamond

Blog - Group content

resolver

You can go HubDB if you want to.
Although, I believe the fastest way is probably using a trick to "hide" topics/tags from the "normal" listing.

For example:

You say you are already using the tags to organize by series. So what you will need to do to create "subtags" would be to apply a custom format that will allow you later to hide from the main listing.

What I usually do is prefix all the subtopics (or hidden topics) with "_"
You will end up with a topic list like:
Main-serie

_sub-serie

 

Then in your blog template, you can filter out whenever you are displaying the list of topics to something like this:

{% for topic in content.topic_list %} 
  {% if not topic is string_startingwith "_" %}
    {# Display here your tag #}
    ....
  {% endif %}
{% endfor %}

This way you can keep some subtopics independently from the "main tags" (or series in your case). But keeping the default listing functionality provided by Hubspot, as you will have access to the topic page like url.com/blog/tag/_subtopic

If this answer helps you to solve your questions please mark it as a solution.

Thank you,


Gonzalo Torreras

HubSpot freelance developer

hola@gonzalotorreras.com
www.gonzalotorreras.com
Schedule a meeting
Philip_Marsh
Colaborador

Blog - Group content

resolver

Thank you, I have 2 follow up questions because there are 2 ways I can implement that method.

 

If I use that at the start, is there a way to use truncate to cut it To my knowledge, it only works at the end and works backwards.

 

Alternatively, if I add the _ at the end of the tag, is string_endingwith a valid function?

 

If so, using the blog will save me so much build time. 

0 Me gusta
Gonzalo
Solución
Colaborador líder | Partner nivel Diamond
Colaborador líder | Partner nivel Diamond

Blog - Group content

resolver

Hi @Philip_Marsh ,

Sorry but, I dont fully understand what you mean with

 

(eng is not my main lang 🙂 )

Anyway, I believe the general idea is to keep it "hidden" from the frontend which is actually a valid thing I often do too.

For that you will only need to cut the first char of the string name when displaying the tag name (whereever you are doing it, so double check all the places!).
Common places to cut the it from:

Listings pages:

- Blog header (when in topic/tag listing)

- Maybe sidebar (in all listing pages)

 

- Post page:

- Topic/tag list in post page.

- Sidebar?

 

To keep a clean name in the frontend, when displaying the topic name you will want to do something like:

{{ topic.name|replace("_", "") }}

This method actually doesn't require to use the underscore, if you want to be safe you could use a more uncommon symbol for your client or concatenate twice like __ if you want to use normal underscore somewhere else.

The only place that will be visible is the slug of the URL, but that should be more than fine I believe.

 

As you can imagine this method is pretty easier to expand, like you could potentially create several levels of tags, or even combine different listings as categories (if contains your special char.) and normal tags for the common etc. 

 

For extra documentation, you can check all the available filter you can apply to strings here:

 

 

 

If this answer helps you to solve your questions please mark it as a solution.

Thank you,


Gonzalo Torreras

HubSpot freelance developer

hola@gonzalotorreras.com
www.gonzalotorreras.com
Schedule a meeting
Philip_Marsh
Colaborador

Blog - Group content

resolver

That's brilliant. I think this pretty much answers everything I have on this topic. 

 

I don't know why I didn't think of the Replace command. Early morning brain. 

 

Thank you

dennisedson
Equipo de producto de HubSpot
Equipo de producto de HubSpot

Blog - Group content

resolver

Hello @Philip_Marsh !

This is a great question, I am going to throw some people into this to see how people are doing this.

@stefen , @ChadP , @Gonzalo , @Jake_Lett  -- how are you all approaching this?

stefen
Asesor destacado | Partner
Asesor destacado | Partner

Blog - Group content

resolver

@Philip_Marsh @dennisedson I've done a similar thing a while back by creating a blog for each one and then making a custom page template to combine them all into one. So the main blog page was actually just a website page that listed posts from each of the blogs.

Stefen Phelps, Community Champion, Kelp Web Developer