Limit character length for new blurbs, etc.

edited January 2017 in Feature Requests
I'm displaying some blog blurbs on the home page of a website I'm working on... I am just displaying the TITLE and a Read More link, but I want to limit the number of characters of the TITLE. If anyone could help, or provide some insight I would appreciate it. Thanks in advance.

Comments

  • edited 4:39AM
    You could try using the word_limiter or char_limiter functions from CodeIgniter:
    https://codeigniter.com/user_guide/helpers/text_helper.html
  • edited 4:39AM
    I'm not that savvy with PHP, but I'm fairly capable of manipulating FUEL. Do I add the CI scripts to the helper file? Or do I add it directly to the page I want the blurb to show up on. I'm not 100% clear on this probably because I'm a designer before coder. Hmmmm?
  • edited 4:39AM
    If it is a blog post object, you may be able to use one of the built in magic methods in the template:
    $post->title_excerpt(15)
  • edited 4:39AM
    thank you. had to add ' ' around the number but worked.

    $post->title_excerpt('50')
Sign In or Register to comment.