Hi I have not been able to find the “correct” way to do this but I’m trying to use Tags to add posts to “categories” (News, Videos, etc.) which I want to use for a filtering dropdown, and to use as text labels on the DOM. In the front matter it looks like this:
category = ["News"]
and in the layout template I’m printing it like this:
Which works but it prints the category with brackets around it [News] so I believe I’m thinking about this the wrong way. I’m using Forestry and I need the user to be able to categorize new posts and Tags seemed to be the appropriate way. Any help getting me in the right direction to understand is appreciated. Thank you
edit: I should also probably add my config bits look like this:
You are doing something wrong if the same brackets are still displayed. Either you changed it in the wrong template or at a location where .Params might refer to something else (don’t know what, but with just snippets and not the whole repo to look at we are working on a black box).
Hey this worked and removed the brackets! I looked at the docs and didn’t seen any specific way to only return the first item in the delimit list but that’s another problem. Thank you
delimit is more for “concatenating” slices (arrays).
As annoying as it might be, a good start, if you have a weekend free, is to just page through the whole documentation. There is a lot of good features that are buried in it, most times in the code samples.