Limit the amount of content

10 posts by 4 authors in: Forums > CMS Builder
Last Post: August 1, 2008   (RSS)

By grauchut - July 30, 2008

Is there a way that I can limit the amount of text content that is added by my clients. I need to limit the main page but have the total text content show on the linked page.

Thanks
Glenn Rauchut (Owner) Emergency Designz

Re: [grauchut] Limit the amount of content

By Dave - July 31, 2008

You can limit the max chars by setting "Max Length" in the field editor. Would that work for you?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Limit the amount of content

By grauchut - July 31, 2008

Say the client enters a long narrative in the wysiwyg section. If I only want a 1/4 of the story on the main page and the whole story to show on the linked page. Does that make sense?
Glenn Rauchut (Owner) Emergency Designz

Re: [grauchut] Limit the amount of content

By grauchut - July 31, 2008

I need to limit the first page. I need the whole story to show on the second Page or Linked page
Glenn Rauchut (Owner) Emergency Designz

Re: [grauchut] Limit the amount of content

By Dave - July 31, 2008

There's ways to do it with custom php code, to take the first x chars of content. But a better way is often to have a summary field because then they have more control over what is displayed. Is that an option?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Limit the amount of content

By grauchut - July 31, 2008

Dave,

Should I just create another wysiwyg section for them. So I can limit the first one and let them complete the story with the added section. Then set the page up to display both on the second page. Thanks Again.
Glenn Rauchut (Owner) Emergency Designz

Re: [grauchut] Limit the amount of content

By Dave - July 31, 2008

Yea, just set up a second wysiwyg for the summary (or textbox if you don't want them changing the format).

Then either show both on the detail page (summary and content) or have them repeat the summary info in the content wysiwyg.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Limit the amount of content

By Michael Blake - August 1, 2008

Hi Dave,
Just read this post, am I correct in thinking that I can make it so that editors can only submit text and not format their own content. I'm keen to maintain a consistent style and if this can be done that would be great.

Mickey

Re: [Michael Blake] Limit the amount of content

By Donna - August 1, 2008

Hi Mickey,

Yep, just set it to a textbox instead of a WYSIWYG field. :) Technically, someone who's adept with HTML could still add in their own code, but it discourages people from doing it willy nilly.
Donna

--
support@interactivetools.com

Re: [Donna] Limit the amount of content

By Dave - August 1, 2008

And you can force it to be displayed as text (even if they enter HTML) by adding "htmlspecialchars" in the display tag like this:

<?php echo htmlspecialchars($record['content']); ?>
Dave Edis - Senior Developer
interactivetools.com