Author Topic

André R.

Friday 22 June 2007 2:28:48 pm

Comment24657

Simplified example of your script (removed on resize)

 var tl, my_second_param = 'node_id:33456', tlXmlUrl = {'mymodul/myview/myfirst_param'|ezurl()} + '/' + my_second_param;

{literal}
function onLoad() {

                var eventSource = new Timeline.DefaultEventSource(0);
                var theme = Timeline.ClassicTheme.create();
                theme.event.bubble.width = 320;
                theme.event.bubble.height = 220;
                var d = Timeline.DateTime.parseGregorianDateTime("2000")
                var bandInfos = [
                                Timeline.createBandInfo({
                                                width:         "100%", 
                                                intervalUnit:  Timeline.DateTime.YEAR, 
                                                intervalPixels: 200,
                                                eventSource:   eventSource,
                                                date:          d,
                                                theme:         theme
                                                                  })
                                       ];
                tl = Timeline.create(document.getElementById("kstl"), bandInfos, Timeline.HORIZONTAL);
                Timeline.loadXML( tlXmlUrl, function(xml, url) {                 
                                eventSource.loadXML(xml, url);
                });
}
{/literal}

So create your own extension with a module and the views you need, for example 'timeline/xml', and output anything you need from php.

Unless the xml is static, in that case I would use ezdesign or ezroot operator on the uri, point it to the file and make sure that apache rewrite rules allow xml files.

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