Newbie Here with limited coding experience (i.e. javascript at the MOST basic of levels)
I am trying to split a tag name on a “:” as I would like to use internal tags to organize how my posts show up in a hierarchy. With just using tags, I cannot know for example if a tag is a country visited or the name of a trip and I would like to use that information logically for my site layout.
Tag1(T: Trip 1) Tag2(C:Country1) Tag3 (D:Destination1) Tag4(D:Destination2) … etc
So that I can layout pages like:
Home – most recent entries by T:Trip
Trips --T:Trip1
–T:Trip2
Countries Visited: – C:Country1
– etc.
Most Recent Destinations: – D:Destination1
–D:Destination2
This would be very easy if there were a “split” function in handlebars… but there is not so looking at github I found:
Handlebars-helpers which states it can be used in Ghost:
So I tried to put that anywhere of about 20 different places and realize its just not getting the helper functions registered.
I want to be able to do something like the following:
{{#posts}}
{{#foreach tags}}
splitname: {{split name ":"}}
{{/foreach}}
{{/posts}}
then do some matches on Splitname.
Any thoughts?
Thanks in advance… Bill