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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

SS 3.0.5 valid_elements question, and Layout


Reply

2 Posts   312 Views

Avatar
Delyk

19 March 2013 at 7:04am (Last edited: 19 March 2013 7:06am), Community Member, 1 Post

I'm trying to get started with SilverStripe and trying to understand how best to work with the TinyMCE editor and how best to start adding content.

1. Using SS Version 3.0.5 and I've discovered that the Editor restricts the html that can be entered. This can be customized through a "valid_elements" property, but I am not sure where I would set this. Every version seems to be in a different place.

I added the following line to my _config.php file:

HtmlEditorConfig::get('cms')->setOptions(array('valid_elements' => "* [ * ]"));

But the editor is still stripping my CSS style tags, any idea's where to set this?

2. I would like to layout my pages using a 3 column setup. with Left - Main - Right sections.

If I can get the valid_elements problem sorted out I can use DIV's for each of the columns and float the Left and Right, is this the preferred way of doing it? Or must I use Tables?

I have many pages that I would like to setup in this fashion so is this something that I would build a template for? Is there any Docs or examples anyone can point me to?

Thanks,
David Elyk
www.davidelyk.com

Avatar
IOTI

19 March 2013 at 9:03am Community Member, 189 Posts

Hi Delyk!

While I can't offer advice on getting the "valid_elements" working correctly, I will offer some advice when it comes to working with SilverStripe. Don't use the CMS to manage layout, its a Content Management System. Use it to manage content, not the layout of your pages!

Regarding your 2nd question, yes you would build a new template for this. Check out the tutorial here [url]http://doc.silverstripe.org/framework/en/tutorials/[/url]. Go through Tutorials 1 through 5 and that should give you a great starting point for creating the template you need. As you get stuck, come back to the forums and ask for help, or log into the irc channel.

Hope this helps.

Regards