It is currently Sun Jan 29, 2023 3:22 pm

items[i]. itemSnippet

items[i]. itemSnippet

Post: #1

Snippet of the post's content for the first post of the blog.


items[i]. itemSnippet is a member of the Blog List dictionary.



itemSnippet has data type string

Strings are quote-wrapped sequences of characters.

Metadata

Metadata are implicit properties belonging to a data type. If your data has the name 'foo', you reference it with 'data:foo'. If the metadata is 'bar', you can reference the value of foo's metadata bar with 'data:foo.bar'.

length: Provides the number of characters in the string.
size: Same as length.
escaped: Provides the HTML escaped equivalent of the string. This is useful when the string may represent user input, to avoid HTML injection attacks
jsEscaped: Provides the JS escaped equivalent of the string. This is useful when the string may represent user input, to avoid JS errors.
jsonEscaped: Provides the JSON escaped equivalent of the string. This is useful when the string may represent user input, to avoid JSON errors.
cssEscaped: Provides the CSS escaped equivalent of the string.

Operators

string1 == string2
(Also supported with the syntax eq)
Returns true if the first string is equal to the second (case-sensitive).
string1 contains string2
(Also supported with the syntax in)
Returns true if the first string contains the second (case-sensitive).
snippet(string, options)
Produces a short snippet from an HTML string.
options: Object specifying the snippeting options, which are:
  • links: boolean for whether to preserve anchors/links in the snippet. Defaults to true.
  • linebreaks: boolean for whether to preserve linebreaks (
    tags
    ) in the snippet. Defaults to true.
  • ellipsis: boolean for whether to append an ellipsis (…) to the end of the snippet. Defaults to true.
  • length: Number specifying the maximum length of the snippet.
Example usage
<b:eval expr='snippet(data:post.body, { length: 150, links: false, linebreaks: false })' />


Login

|

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 239 on Mon Dec 26, 2022 4:40 am

Statistics

Total posts 4 • Total topics 3 • Total members 1 • Our newest member admin