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):
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 a year ago · Edit answerThis 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 a year ago · Edit answerThat 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 a year ago · Edit answer