Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 12-05-2020, 12:27 PM   #1
tamarissa
Connoisseur
tamarissa began at the beginning.
 
Posts: 56
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura H2O
Template tweaking to remove unused parameter

This template works great when all the fields are populated with data:

Code:
{author_sort}/{series}/{series_index:0>2|| - } {title} ({#sub_series}, Book {#sub_series_index:0>2||})
When there isn't a sub-series, I still get "(, Book )" in my results. That's the part I want to get rid of if there is no sub-series. Is that possible?

Code:
({#sub_series}, Book {#sub_series_index:0>2||})
tamarissa is offline   Reply With Quote
Old 12-05-2020, 01:08 PM   #2
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Move the optional text inside as a suffix inside the #sub_series, you also move the opening parenthesis "(" to be a prefix in the sub_series and the closing parenthesis as a suffix in the #sub_series_index

Code:
{author_sort}/{series}/{series_index:0>2|| - } {title} {#sub_series:|(|, Book} {#sub_series_index:0>2||)}
You can consult the template manual for more on this.
capink is offline   Reply With Quote
Advert
Old 12-06-2020, 12:25 AM   #3
tamarissa
Connoisseur
tamarissa began at the beginning.
 
Posts: 56
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura H2O
Thanks, that worked great.

I did look at the manual, but it didn't really help out in this particular case, sorry. I'm only about 40% template savy.
tamarissa is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
remove unused CSS rules rjwse@aol.com Editor 13 09-18-2019 09:39 AM
Inconsistencies in Remove unused CSS rules!? chaot Editor 8 04-28-2016 12:38 PM
Remove unused class attributes phossler Editor 15 01-26-2016 01:06 PM
Remove unused folders in Calibre Library hashken Calibre 3 11-16-2014 06:05 AM
Remove unused CSS Rules Divingduck Editor 2 06-21-2014 07:51 AM


All times are GMT -4. The time now is 08:42 PM.


MobileRead.com is a privately owned, operated and funded community.