View Single Post
Old 09-08-2025, 08:42 AM   #10
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,495
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by thiago.eec View Post
P.S: I did this using Python Mode. I could not find a way to interpret the authors field as list in the regular Template Mode. What am I missing?
Use a for loop, as in
Code:
program: 
	res = 'Authors:';
	for aut in "authors":
		res = res & '<br>' & aut
	rof;
	res
If a for loop is given the lookup name of a column it uses the separator for that column. If you have the list in a variable then the following works:
Code:
program: 
	res = 'Authors:';
	for aut in $authors separator '&':
		res = res & '<br>' & aut
	rof;
	res
chaley is offline   Reply With Quote