[Cubicweb] annotating divs with rql and vid

Pierre-Yves David pierre-yves.david at logilab.fr
Fri May 25 10:43:45 CEST 2012

On Thu, May 24, 2012 at 06:52:57PM +0200, Nicolas Chauvat wrote:
> On Thu, May 24, 2012 at 06:25:45PM +0200, Sylvain Thénault wrote:
> > instance. Following Nicolas proposal, we would need for instance to record the 
> > arguments on html attribute, eg '<div vid="myview" args="arg1='' arg2='babar'...">'.
> or <div data-cw_vid="myview" data-cw_rql="Any X" data-cw_extra="arg1=babar&arg2=celeste">

If we are to group them in a single attribute we should use a json form to ease
client side handling.::

    <div data-cw_vid="myview" data-cw_rql="Any X" data-cw_extra="{arg1:'babar', arg2: 'celeste'}">

Please also note that content of view argument are send as **valid json**

This mean:


instead of 


This is necessary to handle argument other than "string" for view 'int, None,
list, dict, etc".[1]

Pierre-Yves David


[1] or we could use PHP!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20120525/6266836e/attachment-0271.sig>

More information about the Cubicweb mailing list