View Single Post
Old 05-20-2014, 02:57 PM   #3
Snow Sciles
Connoisseur
Snow Sciles ought to be getting tired of karma fortunes by now.Snow Sciles ought to be getting tired of karma fortunes by now.Snow Sciles ought to be getting tired of karma fortunes by now.Snow Sciles ought to be getting tired of karma fortunes by now.Snow Sciles ought to be getting tired of karma fortunes by now.Snow Sciles ought to be getting tired of karma fortunes by now.Snow Sciles ought to be getting tired of karma fortunes by now.Snow Sciles ought to be getting tired of karma fortunes by now.Snow Sciles ought to be getting tired of karma fortunes by now.Snow Sciles ought to be getting tired of karma fortunes by now.Snow Sciles ought to be getting tired of karma fortunes by now.
 
Posts: 65
Karma: 400010
Join Date: Mar 2013
Location: London
Device: Nook STG, PW2
Quote:
Originally Posted by eschwartz View Post

EDIT: This code block takes up several lines, but only because I wanted to make it clear what is going on -- I like to indent and put each section on its own line. It may actually be MORE readable in calibre if it is all one line; this works too:
Code:
{#fandom:'ifempty(sublist($, 0, 1, ","), field("authors"))'}
No worries about the block, it is clearer and for the first time, the template language looks familiar as it reminds me of php. Which I'm somewhat knowledgeable about. Thanks for your help. I re-jigged a few things and today used it to reorganise the books on my Nook.

In case someone else is interested in organising their folders by the name of their library;

Code:
{title:'current_library_name()'}/{title:'contains(current_library_name(), 'Fanfiction Library',sublist(field('#fandom'), 0, 1, ","), field("authors"))'}/{title}
Again, thanks eschwartz.
Snow Sciles is offline   Reply With Quote