View Single Post
Old 12-02-2020, 01:21 PM   #6
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,471
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Code:
program:
	if field('#readorder') then
		 template('Reading List: {#readorder} #{#readorder_index:0>2s}')
  else
	if field('#fanficcat') then
		 template('{#fanficcat}')	
	fi
fi
This puts "PLUGBOARD TEMPLATE ERROR" on everything that's not a fanfic or on a reading list. Did I miss a step?
It works fine for me. Are you sure you copied the template you are really using to your post?

Example: this template works on calibre 5.6, substituting '#series' for '#readorder' and '#enum' for '#fanficcat'. If neither is set the template produces an empty value.
Code:
program:
	if field('#series') then
		 template('Reading List: {#series} #{#series_index:0>2s}')
	else
		if field('#enum') then
			template('{#enum}')	
		fi
	fi
EDIT: You are using this template in a plugboard? I need to look at that.

EDIT 2: Run calibre in debug mode and post the exception information.

Last edited by chaley; 12-02-2020 at 01:27 PM.
chaley is offline   Reply With Quote