snippet operator in Blogger is used to make excerpt or post summary. It can cut the maximum character in the Text such as article body based on parameter used by this operator.

Blogger Excerpt Operator [snippet]

STRING snippet {PARAMETERS:VALUE}

The Parameter for [snippet] Operator

These are parameter for snippet operator, used multiple parameter must be separated by a comma. When parameter is not present in the settings, default value will be taken.

Parameter Value Default Value Meaning
length number 50 The x* number length of the summary. Has Minimum 50 character and Maximum 1000 character.
linebreaks true | false true Preserve or Discard Line Break in the target block of string if any.
links Preserve or Discard Links present in the target block of string if any.
ellipsis Adds three dots ... in the end of summary.


Blogger Excerpt Operator [snippet] Example

<b:eval expr='data:post.body
       snippet { 
         length: 150,
         links: false,
         linebreaks: false }'/>
Try to add above code right under <b:includable id='post' var='post'>. With this evaluation, we create post summary with 150 character length, if there any link present, it will be treated like normal word, and if there is any line break in the block of string we targeted such as <br /> it will be removed. Three dots will be there in the end of 150 character that we set on the length, even we not adds ellipsis parameter since the default value is 'true'.

Creating Post Summary with snippet Operator

There are several Blogger data expression to create post summary.

data:post.body
This is the post body part or article of our post. If we use this as summary, it contains basic word formatting, such as BOLD or ITALIC. Has Maximum 1000 character from post body.

data:post.longSnippet
Same as above but All character treated as normal character, no BOLD, ITALIC, Link, Line Break.

data:post.snippets.long
Same as above but only work for Layout Version 3 with widget version 2.

Other operators

Share This

About
BloggerBasics101 is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.
Misc
Course