Results 1 to 3 of 3

Thread: Trim teaser

  1. #1
    User
    Join Date
    04-10-11.
    Posts
    162

    Default Trim teaser

    Is there a way I can have Isotope/Contao automatically trim the teaser of a product if it is too long?

    So:
    This teaser is too long and needs to be made shorter.

    Would be output as something like:
    This teaser is too long...

    Alternatively, is there a way to limit the number of characters allowed in the teaser box when editing a product?

    Thanks

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Trim teaser

    you can do this easily in the template with some code: substr($this->title, 0, 35); where 35 is your max characters. You could also use the word-split functions to not cut through a word.

  3. #3
    User
    Join Date
    04-10-11.
    Posts
    162

    Default Re: Trim teaser

    Thanks for the quick reply! That works great.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •