eZ Community » Forums » Setup & design » Is the code for this site available?
expandshrink

Is the code for this site available?

Is the code for this site available?

Sunday 26 September 2010 1:20:26 am - 22 replies

There are some great features on this site. Is the source code available anywhere?

Thanks,

Fraser

Tuesday 13 December 2011 10:12:16 am

Thanks for the information.

Tuesday 13 December 2011 5:17:50 pm

It turns out that the editor will only load when the site access is set to DevelopmentMode=enabled.  I've tried adding {set-block scope=global variable=cache_ttl}0{/set-block} to all the templates involved and that had no effect.  In the debug console I get two failed get requests tinyMCE js files, one for the langs and one for the theme.  The script is using a base URI that is relative to the page URL rather than the actual location of the files.  

Hi Fraser, 

Sorry for the late reply. 

It seems that URL construction is faulty, and not using the ezurl type-of template operators. Have you tried loading all required script during the initial page load, as detailed a bit above. The idea is to place the following type of code in the pagelayout : 

{if and( is_set( $persistent.load_tiny_mce ), $persistent.load_tiny_mce )}
<script id="tinymce_script_loader" type="text/javascript" src={"javascript/tiny_mce.js"|ezdesign}></script>
{ezscript( array( 'ezoe/ez_core.js' ) )}
{/if}

 

As in-place edition is probably not required on all pages, the loading of the eZOE/TinyMCE JS scripts should happen when in-place edition is to happen. This can be controlled from the view template, passing information from the view template up to the pagelayout through the persistent variable.

Example : 

{set scope="global" $persistent_variable=hash( 'load_tiny_mce', true() )}

This should support production mode without problem (View Cache enabled, Template cache and compilation enabled, etc ).

Cheers,

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from