Can we cut string in blogger template?

330 Views Asked by At

I want to make string "baa" from "foo:baa" in blogger template, we know can add string post.title + "baa", but how to cut string in blogger template?

2

There are 2 best solutions below

0
On
<b:eval expr='snippet(data:post.title, { length: 10 })' />
0
On

You can do that with operator extract like so :

<b:eval expr='data:post.body snippet { length: 150 }'/>

But sadly, this operator mean to use for post body which of course ussually longer than a hundred character long. The length of character you can extract is vary from 50 to 1000 characters long.

Reference : https://bloggercode-blogconnexion.blogspot.com/2017/04/operator-snippet.html