Open main menu

Changes

no edit summary
<noinclude>
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 (&#8230;) is added.
'''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely returns them.
</noinclude><includeonly><!--
--><!-- --><!-- exctract only the first 1000 characters -->{{#ifvardefine: varTextShort|{{#pos_esub: {{{vartext|}}}|\n0|1000}}|}}<!-- --><!-- --><!-- check if there is a paragraph sign-->{{#vardefine: varPos|{{#explode_epos_e:{{{vartext|}#var: varTextShort}}|\n}}|0}}<!----><!---->{{#if: {{#var: varPos}}<!-- -->|<!-- if there are two or more paragraphs -->|{{#explode_e: {{vartext#var: varTextShort}}|\n|0}}}<!-- -->|<!-- if there is one paragraph or less -->{{#vardefine: varLen|{{#len: {{#var: varTextShort}} }}|}}<!-- --><!-- -->{{#ifexpr: {{#var: varLen}} > 997<!-- -->|{{#sub: {{#var: varTextShort}}|0|997}}&#8230;<!-- -->|{{#var: varTextShort}}<!-- -->}}<!-- ifexpr
-->}}<!-- if
--></includeonly>