AJAX and ezpublish !

Author Message

Marvix Marx

Sunday 02 September 2007 4:02:16 am

Hi ..

How to load data to div element via ajax, I mean the ezpublish template issue, some one told me to do same like print layout, didn`t wrok, because always the template system load all the template ...

Any plane for implementing AJAX tools in the future versions !

if you have done something at user side page with ajax please share it if possible !

Thanks in advanced ...

Bruce Morrison

Sunday 02 September 2007 6:49:31 pm

Hi Marvix

Try the xajax extension
http://ez.no/community/contribs/applications/xajax and examples
http://ez.no/community/contribs/examples/xajax_hello_world

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Heath

Sunday 02 September 2007 10:29:51 pm

Hello Marvix,

There is a brief stub entry on eZpedia highlighting contributions and forum messages regarding ajax, <i>http://ezpedia.org/wiki/en/ez/ajax</i>

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Xavier Dutoit

Monday 03 September 2007 9:09:00 am

Look at the xajax extension.
Otherwise, a brand new json one is coming soon there

http://projects.ez.no/json

http://www.sydesy.com

Bruce Morrison

Monday 03 September 2007 4:31:14 pm

Hiya

I think there is some difference between the xajax & json extensions. The xajax extension packages the xajax project ( http://www.xajaxproject.org/ ) and provides access to an ajax library. It doesn't actually do anything itself. It's a great starting point for adding ajax functionality to a site.

From what I've read, Xaviers JSON extension will provide access to eZpublish objects (nodes, objects etc) via ajax (presented in JSON format). This sounds a little more specific to me.

So xajax would be a great base for building any ajax functionality, JSON sounds like it will be excellent it you need to deal with eZ Objects via ajax. (While I haven't yet seen the JSON code it could be built using the xajax library)

@Xavier - I think you need 2-3 more *s in the JSON project description ;)

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Xavier Dutoit

Wednesday 05 September 2007 6:27:54 am

Hi,

Generating a bit of html is easy on ez:

Create a view that you want (eg ajax)

create a layout that is empty (I think fullscreen is standard)

/set/layout/fullscreen/content/view/ajax/<nodeid>

I use jquery on the client side, about one line to call that page and update the page to add the new content.

Otherwise, yes, might need to update the description of the project ;)

X+

http://www.sydesy.com

Xavier Dutoit

Monday 10 September 2007 1:44:20 am

The svn is updated.

Feel free to have a look, add yourself to the project and make it groove !

http://www.sydesy.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 13:45:08
Script start
Timing: Jan 19 2025 13:45:08
Module start 'layout'
Timing: Jan 19 2025 13:45:08
Module start 'content'
Timing: Jan 19 2025 13:45:08
Module end 'content'
Timing: Jan 19 2025 13:45:08
Script end

Main resources:

Total runtime0.0175 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.0313152.6094
Module start 'layout' 0.00680.0033 741.640639.4141
Module start 'content' 0.01010.0054 781.054797.2734
Module end 'content' 0.01550.0020 878.328142.3047
Script end 0.0175  920.6328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003017.0215140.0002
Check MTime0.00116.5198140.0001
Mysql Total
Database connection0.00116.324110.0011
Mysqli_queries0.002816.238430.0009
Looping result0.00000.078810.0000
Template Total0.00169.410.0016
Template load0.00095.040810.0009
Template processing0.00084.333910.0008
Override
Cache load0.00063.506010.0006
General
dbfile0.00095.314080.0001
String conversion0.00000.044940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs