xajax simple example needed...

Author Message

Jorge estévez

Wednesday 25 June 2008 3:19:31 pm

Hi eZ people !
I have xajax 0.5 extension installed in my cms (eZ Publish 3.10.x), but I've never used xajax before. So what I need is maybe a simple line of code that allows me to show the content of a node in some HTML div, for example, using xajax calls.
<b>note: my site is already finished, I just need to change my links to xajax instead of the classic way</b>

I'm thinking maybe in some function with a parameter: $url, containing the URL I need to fetch to, depending on the node content I need to show. Is that possible ? or there is some other better way ?

I'm running out of time....
Can anyone help me, please ?

thanks in advance,
Jorge

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Maxime Thomas

Sunday 24 August 2008 11:03:02 pm

Hi,

As I remember, you just have to include the javascript in your template, set up xajax.ini with the correct function names, create a class with the right PHP functions, and then update your templates to call the xajax function in javascript. So, when then page loads, your javascript will be triggered and the name of the javascript function will be checked in the INI file and finally your PHP function will be executed and the result will be sent to your javascript.

Max

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

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 18 2025 11:40:38
Script start
Timing: Jan 18 2025 11:40:38
Module start 'layout'
Timing: Jan 18 2025 11:40:38
Module start 'content'
Timing: Jan 18 2025 11:40:39
Module end 'content'
Timing: Jan 18 2025 11:40:39
Script end

Main resources:

Total runtime0.7860 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0087 587.9141152.6250
Module start 'layout' 0.00870.0036 740.539139.4453
Module start 'content' 0.01240.7721 779.9844528.5703
Module end 'content' 0.78450.0014 1,308.55478.1641
Script end 0.7859  1,316.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00670.8522160.0004
Check MTime0.00440.5575160.0003
Mysql Total
Database connection0.00080.104510.0008
Mysqli_queries0.733793.3483540.0136
Looping result0.00060.0745520.0000
Template Total0.746995.020.3734
Template load0.00230.290420.0011
Template processing0.744694.733120.3723
Template load and register function0.00050.067810.0005
states
state_id_array0.00210.267610.0021
state_identifier_array0.00130.161220.0006
Override
Cache load0.00190.2387160.0001
Sytem overhead
Fetch class attribute can translate value0.00060.082720.0003
Fetch class attribute name0.00190.246830.0006
XML
Image XML parsing0.00090.108420.0004
class_abstraction
Instantiating content class attribute0.00000.001630.0000
General
dbfile0.00080.1008160.0000
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs