Quote:
Originally Posted by HDvision
u mean i can shorten the template?
i mean it does already what i want it to do 
so what would be the advantage from changing the thing with 're'?
dont even know what it means 
|
The 're' adds a leading zero to series indices that are 1 digit long. For example, an index of '5' will be changed to '05', while an index of '15' will be left alone. If you don't want this behavior, then you can use
Code:
{author_sort}/{series:|| -} {series_index:|| -} {title} - {authors} - {isbn}
My question related to how the leading zero was being added. A different solution is to use a format specification that ensures that the series indices have a fixed look. For example,
Code:
{author_sort}/{series:|| -} {series_index:05.2f|| -} {title} - {authors} - {isbn}
will produce the following output for the given series indices:
1 -> 01.00
1.4 -> 01.40
10 -> 10.00
14.43 -> 14.43
Also note that your template will put an extra space after the slash if there is no series or series index, and will have an extra trailing - if there is no ISBN. You probably want to use
Code:
{author_sort}/{series:|| - }{series_index:|| - }{title} - {authors}{isbn:| - |}
As for why it works: if a template element is not empty, then the text after the first | is inserted before the value and the text after the second | is appended after the value. If the template element is empty, then no text is inserted or appended. Thus if a book has an ISBN, a " - " is inserted before it. If the book has no ISBN, then nothing is inserted.