Quote:
Originally Posted by ownedbycats
That fixed books with slashes.  However, now there's no icons for books that are #currentlyreading but don't have a slash:
Any idea what's going on?
|
Yes. There is no 'else' on
Code:
if $#fanficcat && '/' in $#chapters then
so the template produces no output in that case. You need something like this:
Code:
if $#fanficcat && '/' in $#chapters then
f = re($#chapters, '(.*)/.*', '\1');
s = re($#chapters, '.*/(.*)', '\1');
if (s - f) ==# 1 then
'add_book.png'
else
'bookmark-48.png'
fi
else
'exploding-book.png'
fi
When coding a template you should verify the various code paths created by if/then/else to be sure that each path possibility results in what you want based on what you know about the data.