Quote:
Originally Posted by chaley
Yes, you must use General Program Mode to use if statements.
Here is an example ofwhat I think you want to do:
Code:
program:
if '^#MAS$' inlist $#admin_tags then
template('#MAS/{series}/{series_index:0>2s| - |}{title} ({authors})')
elif $series then
template('{author_sort[0]}/{authors}/{series}/{series_index:0>2s| - |}{title}')
else
template('{author_sort[0]}/{authors}/{title}/{title}')
fi
To head off one question: the value of an if statement is the value of the last statement executed inside the if, in the case the last template() call.
If you want $series and $title to use the non-sort values then change the tweak (Preferences / Tweaks) "Control formatting of title and series when used in templates (ID: save_template_title_series_sorting)". Set it to strictly_alphabetic.
FWIW: You have the ' - ' in the series_index portions of the templates in the wrong place. Your examples say they should go after the second '|' so you get the index, the dash, then the title. Example:
Code:
{series_index:0>2s|| - }
|
Great, thank you, I'll give it a go....that looks easier than I thought if I can use template(), I thought I'd need to re-do the whole thing!
And yes, I put the ' - ' in the wrong place!
Many thanks!