Truncate title

Koberz

Joined: 2010-06-08
Posts: 6
Posted: Tue, 2010-06-08 15:33

Is there a way to truncate the title of an image so that it remains a certain character length for my albums pages?

so it shows something like "video_titl..." instead of "video_title-03-041009"

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2010-06-08 17:38

in your theme templates like album.tpl look for
{$child.title|markup}
or
{$theme.item.title|markup}
and change it to something like:
{$child.title|markup|truncate:20}
or
{$theme.item.title|markup|truncate:20}

where 20 is the desired character length

http://codex.gallery2.org/Gallery2:Themes:Reference:Modifiers

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
Koberz

Joined: 2010-06-08
Posts: 6
Posted: Sat, 2010-06-12 20:24

Hey thanks for that suprsidr that worked perfectly.