View Single Post
Old 01-01-2019, 06:26 PM   #1
mrmuk
Junior Member
mrmuk began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2019
Device: none
How to display hierarchial tags separated in 'book details'?

Hello,

I started using some hierarchial tags for some custom columns for the characters in a book. For example's sake, let's say something like this:

Person1.male
Person1.silent
Person2.female
Person2.intelligent

After setting that tag as a hierarchial tag in the settings, the tag browser shows the tags broken down the way one would expect, namely:
  • Person1
    • male
    • silent
  • Person2
    • female
    • intelligent

But in the book details, of course, the tag is displayed the way I entered it, namely:

Person1.male, Person1.silent, Person2.female, Person2.intelligent

Now what I would like is to have automatically deduced columns/tags/text in the book details, which would display something like this:

Person1: male, silent
Person2: female, intelligent

So basically something pretty similar that is done in the tag browser already, but separately for every book on the book details view to have that quick and nice overview.

I tried custom columns built from other columns with a template like this, which did not work:

{#mytag:'contains(Person1, $:subitems(1,0), "No tags yet")'}

Probably I made some mistake here. I also tried Person1.* instead of Person, since it's a regular expression, but that didn't help.

It would be very nice if someone could help me out, as I'm very unfamiliar with the template function language and even after reading the documentation, I don't really understand it.
Also I wonder if there is a simpler way to deduce such subtags from a hierarchial tag rather than making a separate tag column for every item (i.e. Person1, Person2, etc.) manually.

Thanks a lot in advance!
mrmuk is offline   Reply With Quote