module doc_base
import toolcontext
-import doc_model # FIXME maintain compatibility with old templates.
+import model_utils
+import model_ext
# The model of a Nitdoc documentation.
#
# Add a `child` to `self`.
#
# Shortcut for `children.add`.
- fun add(child: DocComposite) do children.add child
+ fun add_child(child: DocComposite) do
+ children.add child
+ end
end
# The `DocComposite` element that contains all the other.
# The title of the group, as displayed to the user.
var title: String
end
+
+redef class MEntity
+ # Name displayed in console for debug and tests.
+ fun nitdoc_name: String do return name.html_escape
+end
+
+redef class MClassDef
+ redef fun nitdoc_name do return mclass.nitdoc_name
+end
+
+redef class MPropDef
+ redef fun nitdoc_name do return mproperty.nitdoc_name
+end