1. improved 'drop' behaviour

    The drop zafu tag is becoming more clever. You can now use drag&drop to alter query parameters used to render a block. These parameters can be just an id (see drop examples) or something more complex.

    It works as follow:

    1. define a block as accepting drops

    You should set the change attribute to “params” since this is what should change on a drop.

    <div do='drop' change='params'>...</div>

    2. add the parameters that should be altered

    Any key='value' pair can be used. Use the special [...] syntax to replace values from the dropped node:

    <div do='drop' change='params' greetings='Hello [name]'><r:show param='greetings'/></div>

    3. result when the contact “Joe” is dropped

    <div class='drop'>Hello Joe</div>
    

    This might not look terribly exciting but you can build extremely powerful tricks on this basis.

    The textarea tag has also been enhanced to support block content. You can use the technique above to create predefined messages:

    <div do='drop' change='params' name='[name]'>
      <r:form>
        <r:textarea name='m_text'>
          contacted <r:show param='name'/> about <r:project do='[v_title]'/>
        </r:textarea>
        <input type='submit'/>
      </r:form>
    </div>

    (the m_text parameter is a special pseudo attribute to create new comments).

    Gaspard Bucher

    comments

    1. leave a comment