Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Themes /

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Text Columns... Grab content and process depending on length

Go to End

4 Posts   1904 Views


Community Member, 1 Post

25 March 2009 at 10:04pm


I'd like to make a theme that displays the text content in columns. However, as my theme is a horizontal layout, I need an undetermined number of columns. I have no problems making the columns themselves... it's just plain HTML + CSS.

The real problem is to get the content, get the number of characters, divide by 800 (my char limit), round it up, then print a <td>content here</td> for each 800-char packet. The Css will take care of the rest.

As you see, I've got a fairly good idea of what to do, and if it was just PHP I'd already have finished. But I just can't seem to find: a) a way to get the length of the content; and b) a way to make the above into something usable by the template...



Community Member, 199 Posts

27 April 2009 at 3:37am

Hi fsapa,

Did you have any luck with this? I would like to know also.

Let me know.



Community Member, 199 Posts

27 April 2009 at 3:41am

I guess you probably used HTMLEditorFields?


Community Member, 109 Posts

16 October 2009 at 4:18am


Is there such a thing as a length() function you can use in a ss page? Sort of like length($Content)?