length news sumary text

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
musicscore
Power Poster
Power Poster
Posts: 496
Joined: Wed Jan 25, 2006 11:53 am

length news sumary text

Post by musicscore »

Hey,

Because I have 2 news colums, I want each colum max. 50 char. long.

I added this command to my template :

{cms_module module="news" start="5" number="5" sortby="news_date" length="50"}

Everything workst fine but the length is more then 50 char.

I use CMSMS 0.12.1. Can I set the maximum length of the Title tekst to 50

Greetings

Musicscore
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: length news sumary text

Post by Dr.CSS »

just don't put more than 50 char. in the summary box at the top of the news edit page.

    mark
musicscore
Power Poster
Power Poster
Posts: 496
Joined: Wed Jan 25, 2006 11:53 am

Re: length news sumary text

Post by musicscore »

My site will be edited by others (sportclub coaches / trainers, etc.) I'm trying to make the site foolproof. I'm getting very far but there are stil some problems. So is the length of the news title & the possiblility of setting where a page will be in the menu by the editor, not only by the admin. Userrights could be more specific.

If you have a hint, please let me know.

Greetings

Musicscore

(sorry for my bad English)
zerrvox

Re: length news sumary text

Post by zerrvox »

this is easily done in the template with the smarty function truncate..

Code: Select all

 {eval var=$entry->content|truncate:350:"..."}
first parameter determines how many characters to truncate to.
second is a text string that replaces the truncated text. (not included in lenght paramer)

I know this topic is a bit old, but I thought I would give you the answer if you still need it and have not solved it and It would be available to other people searching in the forum for a way to do this..  :)
Post Reply

Return to “Layout and Design (CSS & HTML)”