|lignes_longues

  • New in : SPIP 1.9

The |lignes_longues filter, (since SPIP 1.9), inserts hyphens into words that ar "too long", by inserting breakable spaces into them allowing them to drop to the next physical line (useful, for example, to display URLs in a narrow column).

So, if the #TEXTE of an article contains a link like:

<a href="http://www.spip.net/spip.php?page=recherche&recherche=long_lines">http://www.spip.net/spip.php?page=recherche&recherche=long_lines</a>

then

<p style="width:30px;">
[(#TEXTE|lignes_longues{20})]
</p>

will display this as

http://www.spip.net
/spip.
php?page=recherche&
recherche=long_lines

Note that the hyphen maintains the HTML tags; in the example above, all of the link is clickable as can be seen in the HTML source.

By default, this filter cuts off at 70 characters, but you can specify another cut-off length by passing a parameter to the filter, e.g.
[(#TEXTE|lignes_longues{40})].

Author Mark Published : Updated : 21/03/23

Translations : català, English, Español, français, Nederlands