Author Topic

André R.

Wednesday 21 January 2009 1:32:57 am

Comment50600

We tried to use the persistent variables to set the files needed and then use that in pagelayout.tpl but that seemed to be very tricky.

From ezoe:
view:

{set scope=global persistent_variable=hash('title', 'New %tag_name tag'|i18n('design/standard/ezoe', '', hash( '%tag_name', concat('<', $tag_name, '>') )),
                                           'scripts', array('javascript/ezoe/ez_core.js',
                                                            'javascript/ezoe/ez_core_animation.js',
                                                            'javascript/ezoe/ez_core_accordion.js',
                                                            'javascript/ezoe/popup_utils.js'),
                                           'css', array()
                                           )}

popup_pagelayout (slightly modified):

{if is_set( $module_result.content_info.persistent_variable.scripts )}
{foreach $module_result.content_info.persistent_variable.scripts as $script}
    <script type="text/javascript" src={$script|ezdesign}></script>

{/foreach}
{/if}

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom