Skip to content

rife.render.Abbreviate

Erik C. Thauvin edited this page Mar 28, 2023 · 8 revisions

Abbreviate a template value with ellipses.

Usage

<!--v render:rife.render.Abbreviate:valueId/-->
{{v render:rife.render.Abbreviate:valueId/}}

Sample

Template

<!--v render:rife.render.Abbreviate:sample-->
max=12
<!--/v-->

Code

template.setAttribute("sample", "This is a test.");

Output

This is a...

Properties

You can also change the replacement marker as follows:

<!--v render:rife.render.Abbreviate:sample-->
mark=…
max=8
<!--/v-->

which would output:

This is…