5099 Posts in 1519 Topics by 1116 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1123 Views |
-
TinyMCE Templates not working under 2.4? (solved)

19 June 2010 at 4:31am Last edited: 19 June 2010 10:08am
Hi everyone,
in my company we are using the TinyMCE template feature in Silverstripe 2.3 and it works great =)
If I add it in 2.4 the way i added it in 2.3 the template wont show up in the popup. instead i see the errorpage of my website. oO?
Is there another way to add this template feature to TinyMCE or any work around?
thanks in advance
-
Re: TinyMCE Templates not working under 2.4? (solved)

19 June 2010 at 10:08am
I found the problem:
In SilverStripe 2.3 it works like this:
'template_templates' => array(
array('title'=>"my Template",'src'=>"themes/...In 2.4 you HAVE to use an Slash prefix!
'template_templates' => array(
array('title'=>"my Template",'src'=>"/themes/...cheers!
-
Re: TinyMCE Templates not working under 2.4? (solved)

9 August 2010 at 4:29pm
I'm trying to get this to work and was hoping you could share with me the file path you were using (was it in mysite/_config.php?) or did you use the MyLeftAndMainDecorator.php workaround famous here:
http://open.silverstripe.org/ticket/4390?Also can you include the entire code snippet, I'm trying this without success:
HtmlEditorConfig::get('cms')->setOption('template_templates','title[Title Here]|src[themes/mytheme/path/layout1.htm]|description[some description text]');
This gives me an error message, which is more than what i get if i do:
HtmlEditorConfig::get('cms')->setOptions(array('template_templates'=>array('title'=>'Title Here','src'=>'themes/mytheme/path/layout1.htm','description'=>'some description text');Any help would be very much appreciated!
-
Re: TinyMCE Templates not working under 2.4? (solved)

9 August 2010 at 5:21pm
I was lacking an array() level:
HtmlEditorConfig::get('cms')->setOptions(array('template_templates'=>array(array('title'=>'Title Here','src'=>'themes/mytheme/path/layout1.htm','description'=>'some description text'))));
And it is in the MyLeftAndMainDecorator.php file otherwise it is overwritten.
Thanks for your code snippet Ironcheese it saved my day!
| 1123 Views | ||
|
Page:
1
|
Go to Top |

