Andr� van Toly wrote:

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.

Yummy ;) Curious, why the name?

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.

I think that your edit tag is a good way to have a central point of configuration for the editors. Maybe you even want to skip the editor attribute and let the edit taglib be that clever that it can detect it's editor all by itselve(maybe minor config in WEB-INF).


For starting my editor, you only need to know it's servlet location and the url of the page you want to edit. Just concatinate them and your done so i think we should really see them as 2 different types of development (if you agree)

I guess everybody is working on editors nowaday :D
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to