![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 25968
Join Date: Nov 2010
Device: prs 650
|
Can someone make an "if" template for me?
I want to show the series, but if it isn't specified it'll show the title instead.
This is for when saving to disk. I try to read the manual, but it's too complicated for me. Thanks. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Try something like this in your save template:
Code:
{series} {series_index:0>2s|| - }{title} |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 25968
Join Date: Nov 2010
Device: prs 650
|
I only want it to show the title, if there's no series. That is, they won't both appear at the same time. Thanks.
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Second attempt:
Code:
{series:'ifempty($,field('title'))'}{series_index:0>2s| |} |
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 25968
Join Date: Nov 2010
Device: prs 650
|
That works. Thank you.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Enthusiast
![]() Posts: 26
Karma: 10
Join Date: Oct 2010
Device: Samsung SM-T290
|
How do I piggyback :shorten onto that?
|
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() Posts: 26
Karma: 10
Join Date: Oct 2010
Device: Samsung SM-T290
|
And why does
Code:
{series:'ifempty($,field('#genre:|(|)'))'}{series_index:2s|[|] - }{title:|| - }{author_sort} Thanks. ElfN Last edited by Starson17; 06-06-2011 at 12:16 PM. |
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
{series:'ifempty($,field('#genre'))'|(|)}{series_index:2s|[|] - }{title:|| - }{author_sort} |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle DX optimal "page" size - PDF or Word template | guiyoforward | Amazon Kindle | 12 | 09-28-2010 07:05 PM |
Changing "Save Template" not working? | monkbythesea | Calibre | 10 | 08-04-2010 03:30 AM |
template for "send to device" customization | sbin | Calibre | 8 | 01-07-2010 07:22 AM |
"perfect" epub model or template? | gernblanston | ePub | 0 | 09-25-2009 11:00 AM |
Help! the "Make Sony Reader File" under "Options" is different | Dr. Drib | Sony Reader | 6 | 04-23-2007 02:56 AM |