Forums / Developer / xajax developers...

xajax developers...

Author Message

Marcel GD

Friday 27 June 2008 4:29:58 pm

Hi !
I've been posting with some other alias but no answer were received in a while, so I decided to change it for this time.
There is a lot of developers in the [eZjaxx] Ajax Admin extension discussion:
- André R.
- Marco Zinn
- Kristof Coomans
etc.
I'm sure one of them can help me, but I'll be grateful to anyone because I'm locked on this... I really need it.

I need a line of code to fetch an URL using xajax 0.5, already installed in my eZ Publish 3.10.x.
For example, I have this:

<a ... href ={'www.mysite.com/esl/content/view/full/200' | ezurl} ... >text</a>

And I need to transform this link in some way to use xajax.
Is that possible ? How ?
Any clues will be appreciated.

thanks in advance...
Marcel

Łukasz Serwatka

Saturday 28 June 2008 1:29:08 pm

What exactly do you need? The XHTML from that view or content in different format e.g JSON or XML?

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Marcel GD

Tuesday 01 July 2008 1:42:54 pm

Hi Łukasz !
Thank U very much for your response.

I'm a developer and I know ajax from other platforms, but I have not experience on eZ.
So what I need is some way to get:
1- some object with the content of one specific node (JSON & XML are fine).
2- the HTML of that view, so I can insert the values of the content node into that HTML, using JavaScript code.

I already have installed xajax 0.5, and xajax-classattributes in my eZ Publish.

Thank you for your time Łukasz...
Marcel GD

Łukasz Serwatka

Tuesday 01 July 2008 11:00:01 pm

Hi,

I haven't tried specifically xajax, but typically while working with YUI for example, I would create a new module/view where one of the params is a node_id something like

www.example.com/handlerequest/23

Then sending async get call you can get what you want from that URL as on PHP level you can fetch node_id = 23 then generate either XHTML output or whatever you need. You can pass of course more params, like www.example.com/handlerequest/23/JSON, where last part can be use for decision what output return.

To learn more about creating extensions and modules from article or old doc:
http://ez.no/developer/articles/an_introduction_to_developing_ez_publish_extensions
http://ez.no/ezpublish/documentation/development/extensions/building_an_ez_publish_module

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

André R.

Wednesday 02 July 2008 12:43:23 am

If you have Online Editor 5.0 installed, you can reuse it's ajax views.

try:
<system_url>/ezoe/load/<object_id>
<system_url>/ezoe/load/eznode_<node_id>

You can also specify witch datamap attribute to load as second parameter, like:
<system_url>/ezoe/load/<object_id>/image

If you instead want to load all the children of a node you can use expand:
<system_url>/ezoe/expand/<node_id>/<offset>/<limit>
(offset and limit are optional)

The code for the views, load (json):
http://svn.ez.no/svn/extensions/eztinymce/trunk/ezoe/modules/ezoe/load.php

Expand (json):
http://svn.ez.no/svn/extensions/eztinymce/trunk/ezoe/modules/ezoe/expand.php

Search (json):
http://svn.ez.no/svn/extensions/eztinymce/trunk/ezoe/modules/ezoe/search.php

Embed View (xhtml using the templates normally used):
http://svn.ez.no/svn/extensions/eztinymce/trunk/ezoe/modules/ezoe/embed_view.php

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

André R.

Saturday 25 October 2008 12:40:34 am

Since this thread is referred to by others, here are some updates:

Some of the ajax concepts from oe5 have been split out and generalized into a extension called ezcore, right now the extension doesn't do much on it's own, more like a developer toolbox for simplifying ajax concepts in eZ Publish.

http://projects.ez.no/ezcore

Among the concepts:

* css/js packer( php class eZPacker ):
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/ezcss.txt
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/ezscript.txt

* objects/nodes to json/xml/hash/text( php class eZAjaxContent ):
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/node_encode.txt
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/json_encode.txt
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/xml_encode.txt

* ezcore/call (php class eZCoreServerCall):
A xajax like interface for calling your own php/template code as registered by a couple of setting lines, but without any js library dependency.
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/ajax.txt

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