Your sites Log in Sign up Menu

Adding an attribute to title on Archives page based on a tag?

On my main entries page, if a post is a link post I've updated the CSS to show a unicode arrow symbol after the title so people will know the title will take them to another location. I'm trying to achieve the same behavior on the archives page. This could be driven based on a tag value of 'linkpost'.

Is this possible?

Example of how it looks on main page (would like the same symbol to appear after the post title on archives based on a tag value being present):

linkpost example


3 months ago, 3 replies   developers   tags   archives   Improve this question

Yes, within the {{#entries}}..{{/entries}} block on your template's archives page, you could add something like this:

{{#tagged.linkpost}}
Will ONLY appear when the post is tagged 'linkpost'
{{/tagged.linkpost}}
{{^tagged.linkpost}}
Will appear when the post is not tagged 'linkpost'
{{/tagged.linkpost}}

Does that help? Please let me know if you have any question

Answered 4 months ago · Improve this answer

This worked perfectly, thank you.

Now I just need to read up on how to make the archives page have a two-column layout (in just the {{#allEntries}} section) so that I can right justify the dates in this block. If you have any example code for that, please share.

Answered 4 months ago · Improve this answer

That sounds like a CSS problem which can be solved in any number of ways. I'd probably look into using flexbox to accomplish multiple columns

Answered 3 months ago · Improve this answer