bgonz Posted October 17, 2020 Posted October 17, 2020 Hi folks - I am trying to display "tags" on a Custom Post Type I call "Portfolio". I am able to loop through the "section -> collection -> section -> tags" and then display the repeated results of each tag, but is there a way to alphabetize them? {.section collection} {.section tags} <ul class="portfolio-tags"> <li><a href="{collection.fullUrl}">All</a></li> {.repeated section @}<li><a href="{collection.fullUrl}?tag={@|url-encode}" class="entry-tags-tag entry-tag-{@|slugify}" rel="tag">{@}</a></li>{.end} </ul> {.end} {.end} {.section tagFilter} <p class="filtered-by">Filtered by: {@|safe}</p> {.end} Is there a JSON-T Formatter that would help with this? https://developers.squarespace.com/json-t-formatters -- This is particularly crucial for me because the "Portfolio Items" are tagged by "year" ex: 1998, 1999, 2000 Problem is - the tags are not being aggregated (in the JSON) in a logical pattern that I can tell. You can see from the screenshot (attached) the tags are in a somewhat random order. -- My hack, for now hopefully, is to create a custom create a Custom Block Field Region for this Custom Post Type that allows me to inject a simple "Tag Cloud" -> then use CSS to style it in a similar way as I intended. I am not a big fan of this, but it gets the job done for now until I can get a better solution. <squarespace:block-field id="portfolio" columns="12" /> Any suggestions? Thanks in advance.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.