Difference between revisions of "Template:PrintFirstParagraph"
Jump to navigation
Jump to search
(Created page with "<noinclude> This template is used to extract the first paragraph from a given text. '''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely r...") |
|||
Line 8: | Line 8: | ||
</noinclude><includeonly><!-- | </noinclude><includeonly><!-- | ||
− | -->{{#if: {{# | + | -->{{#if: {{#pos_e: {{{vartext|}}}|\n}}<!-- |
− | -->|{{# | + | -->|{{#explode_e:{{{vartext|}}}|\n|0}}<!-- if there are two or more paragraphs |
-->|{{{vartext|}}}<!-- if there is one paragraph or less | -->|{{{vartext|}}}<!-- if there is one paragraph or less | ||
-->}}<!-- if | -->}}<!-- if | ||
--></includeonly> | --></includeonly> |
Revision as of 23:25, 14 March 2018
This template is used to extract the first paragraph from a given text.
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.