View Single Post
Old 01-26-2022, 03:58 AM   #8
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,471
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by davidfor View Post
What you have is almost there. It is putting a space in place of the question mark:

Code:
{series:sublist(0,2, )}
That gets the first two words of the series. And to be clear, there is a space between the comma and the right parenthesis.
This snippet in TPM also works.
Code:
{series:'sublist($, 0, 2,' ')'}
In TPM spaces aren't significant except in strings. TPM might be easier to use if the complete template has several {} sections.

But like @davidfor, I prefer GPM. They are easier to read and can be faster.
chaley is offline   Reply With Quote