View Single Post
Old 01-11-2011, 03:49 AM   #3
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,466
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by jackie_w View Post
This is because the vertical bar has a special meaning in the template language. There may be a way to get exactly what you want but I'm not sure how.
You cannot get around the | issue in single-function mode (the default). You can do it in either template program mode or general program mode.

In template program mode, use:
Code:
{title}{series:'test($, ' | ','')'}{series} {series_index:0>2s|[|]}
In general program mode, use:
Code:
program: 
	strcat(	field('title'), 
			test(field('series'), ' | ', ''), 
			template('{series} {series_index:0>2s|[|]}')
	)
chaley is offline   Reply With Quote