Difference between revisions of "Template:PrintFirstParagraph"
Jump to navigation
Jump to search
Line 23: | Line 23: | ||
-->varlen={{#var: varLen}}<!-- | -->varlen={{#var: varLen}}<!-- | ||
-->{{#if: {{#expr: {{#var: varLen}} > 997}}<!-- | -->{{#if: {{#expr: {{#var: varLen}} > 997}}<!-- | ||
− | -->|{{#sub: {{#var: varTextShort}}|0| | + | -->|{{#sub: {{#var: varTextShort}}|0|800}}…<!-- |
-->|{{#var: varTextShort}}<!-- | -->|{{#var: varTextShort}}<!-- | ||
-->}}<!-- ifexpr | -->}}<!-- ifexpr | ||
-->}}<!-- if | -->}}<!-- if | ||
--></includeonly> | --></includeonly> |
Revision as of 00:22, 15 March 2018
This template is used to extract the first paragraph from a given text. If the first paragraph of the text is longer than 1000 characters, only the first 997 characters are returned, and an ellipsis (…) is added.
NOTE: As any "printing" template, it doesn't store any values anywhere, but merely returns them.
Parameters:
|vartext=
- the text to extract the first paragraph from.