View Single Post
Old 11-23-2021, 05:20 PM   #197
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Can a user category be referenced in a template? e.g. if #column is 'foo' and user category is '@bar' then 'foobar'.

If so, would anything break if I then added 'foobar' to that user category?
I am not sure what question you are asking. Guessing ...

The template function user_categories() returns a list of user categories that the book is in. Using that then this template might return what you might want:
Code:
program:
	if 'foo' == $#column && '^bar$' inlist user_categories() then
		'foobar'
	fi
I don't know if the performance is acceptable.
chaley is offline   Reply With Quote