Re: [Templates] a little text formatting
[prev]
[thread]
[next]
[Date index for 2005/03/15]
--LyciRD1jyfeSSjG0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
* Cahill, Earl <ecahill at corp.untd.com> [2005/03/15 14:09]:
> A start with a line, say
>=20
> This line is really too long.
>=20
> A length, say 25, and suffix, say '...'. I would like to be able to do
> something like this
>=20
> [% my_truncate(line, 25, '...') %]
>=20
> And end up with=20
>=20
> This line is really t...
>=20
> Just wondering if there is something out there that already does this.
The standard truncate filter does this:
$ tpage=20
[% FILTER truncate(25) %]
This line is really too long.
[% END %]
This line is really t...
See L<Template::Manual::Filters> for details.
(darren)
--=20
The secret of life is enjoying the passage of time.
-- James Taylor
--LyciRD1jyfeSSjG0
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iEYEAREDAAYFAkI3UMAACgkQzsinjrVhZap9zwCeIrGHFs3yHjr9ofMBcKJSRd/x
/hAAn1V1UzK/Z2vqANOwVQeYB+QYiPjY
=98fk
-----END PGP SIGNATURE-----
--LyciRD1jyfeSSjG0--
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
 |
Re: [Templates] a little text formatting
Darren Chamberlain 21:16 on 15 Mar 2005
|