View Single Post
Old 12-26-2022, 11:27 AM   #3
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,110
Karma: 77213681
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
This template will display hierarchical tags as separate items and remove any duplicate items. Nonfiction.Biographies, Nonfiction.Music will become Nonfiction, Biographies, Music.

Code:
program: 

split_tags = re($tags, '\.', ',');
list_join(',', split_tags, ',')
This additionally sorts the entries—the above example will become Biographies, Music, Nonfiction.

Code:
program: 

split_tags = re($tags, '\.', ',');
list_sort(list_join(',', split_tags, ','), 0, ',')

Last edited by ownedbycats; 12-26-2022 at 12:00 PM.
ownedbycats is offline   Reply With Quote