At 12:41 +0100 21-02-2005, Eduard Witteveen wrote:
Andr� van Toly wrote:

I haven't installed your example yet, but maybe it is a good idea to integrat it with the edittag. It's just like the second implementation of the edittag i was thinking about working on. It is in cvs speeltuin/andre/edittag for some time now, but i will upload my latest updates (f.e. made EditTag an interface) shortly.

Is this edit tag a replacement for the fieldtag? Could you explain a little bit about the workings of this EditTag?

No it is not a replacement, it is more like an extension. <mm:edit> gives you access to the data in the fields it contains in its body. You can find it in speeltuin/andre/edittag.


<%@ taglib uri="http://www.mmbase.org/mmbase-taglib-1.0"; prefix="mm" %>
<mm:cloud>
  <mm:edit editor="/yammeditor/yammeditor.jsp">
  <mm:node number="default.mags">
    <strong><mm:field name="title" /></strong>
    <mm:related path="posrel,news"
          fields="news.title">
          <mm:field name="news.title" /><br />
        </mm:related>
  </mm:node>
  </mm:edit>
</mm:cloud>

With the above example you get an url to a generic editor 'yammeditor/yammeditor.jsp'.
<mm:edit> works as far as i know on any template. But i don't think you should wrap around a lot of nodes and fields, that could work but leaves you with an overloaded yammeditor :-) Rather i think you should use it on small parts of related data in your template.


This example of <mm:edit> uses the class EditTagYAMMe that implements the interface EditTag. The FieldTag looks if it is surrounded by the EditTag, if it finds nothing it does nothing. When it finds as its parent an EditTag, then it registers its fieldname, nodenumber and originating querry with the EditTag. You can use this information to create an editor, like maybe yours.

---Andr�
--
Andr� van Toly
http://www.toly.nl                                mobile +31(0)627233562
------------------------------------------------------------------>><<--
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to