diff --git a/compound/README.txt b/compound/README.txt
index 4d0a049..06b6e2e 100644
--- a/compound/README.txt
+++ b/compound/README.txt
@@ -316,6 +316,17 @@ When we clear the `private` flag the post becomes visible again.
True
+Micro Articles
+==============
+
+ >>> from loops.compound.microart.base import MicroArt
+ >>> from loops.compound.microart.interfaces import IMicroArt
+ >>> component.provideAdapter(BlogPost, provides=IMicroArt)
+
+ >>> tMicroArt = addAndConfigureObject(concepts, Concept, 'microart',
+ ... title=u'MicroArt', conceptType=tType)
+
+
Fin de partie
=============
diff --git a/compound/microart/__init__.py b/compound/microart/__init__.py
new file mode 100644
index 0000000..4bc90fb
--- /dev/null
+++ b/compound/microart/__init__.py
@@ -0,0 +1,4 @@
+"""
+$Id$
+"""
+
diff --git a/compound/microart/base.py b/compound/microart/base.py
new file mode 100644
index 0000000..3b568be
--- /dev/null
+++ b/compound/microart/base.py
@@ -0,0 +1,73 @@
+#
+# Copyright (c) 2011 Helmut Merz helmutm@cy55.de
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+"""
+Micro articles (MicroArt).
+"""
+
+from zope.cachedescriptors.property import Lazy
+from zope.dublincore.interfaces import IZopeDublinCore
+from zope.interface import implements
+from zope.event import notify
+from zope.lifecycleevent import ObjectCreatedEvent, ObjectModifiedEvent
+from zope import schema
+from zope.traversing.api import getName
+
+from loops.common import adapted
+from loops.compound.base import Compound
+from loops.compound.microart.interfaces import IMicroArt
+from loops.resource import Resource
+from loops.setup import addAndConfigureObject
+from loops.type import TypeInterfaceSourceList
+
+
+TypeInterfaceSourceList.typeInterfaces += (IMicroArt,)
+
+
+class MicroArt(Compound):
+
+ implements(IMicroArt)
+
+ _adapterAttributes = Compound._adapterAttributes + ('text',)
+ _noexportAttributes = ('text',)
+ _textIndexAttributes = ('text',)
+
+ defaultTextContentType = 'text/restructured'
+ textContentType = defaultTextContentType
+
+ def getText(self):
+ res = self.getParts()
+ if len(res) > 0:
+ return adapted(res[0]).data
+ return u''
+ def setText(self, value):
+ res = self.getParts()
+ if len(res) > 0:
+ res = adapted(res[0])
+ else:
+ tTextDocument = self.conceptManager['textdocument']
+ name = getName(self.context) + '_text'
+ res = addAndConfigureObject(self.resourceManager, Resource, name,
+ title=self.title, contentType=self.defaultTextContentType,
+ resourceType=tTextDocument)
+ #notify(ObjectCreatedEvent(res))
+ self.add(res, position=0)
+ res = adapted(res)
+ res.data = value
+ notify(ObjectModifiedEvent(res.context))
+ text = property(getText, setText)
diff --git a/compound/microart/browser.py b/compound/microart/browser.py
new file mode 100755
index 0000000..f35c83a
--- /dev/null
+++ b/compound/microart/browser.py
@@ -0,0 +1,52 @@
+#
+# Copyright (c) 2011 Helmut Merz helmutm@cy55.de
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+"""
+View classes for micro articles (MicroArt).
+"""
+
+
+import itertools
+from zope import component
+from zope.app.pagetemplate import ViewPageTemplateFile
+from zope.cachedescriptors.property import Lazy
+
+from loops.browser.concept import ConceptView, ConceptRelationView
+from loops.common import adapted
+from loops import util
+from loops.util import _
+
+
+view_macros = ViewPageTemplateFile('view_macros.pt')
+
+
+class MicroArtView(ConceptView):
+
+ @Lazy
+ def macro(self):
+ return view_macros.macros['microart']
+
+ def render(self):
+ return self.renderText(self.data['text'], self.adapted.textContentType)
+
+ def resources(self):
+ stdPred = self.loopsRoot.getConceptManager().getDefaultPredicate()
+ rels = self.context.getResourceRelations([stdPred])
+ for r in rels:
+ yield self.childViewFactory(r, self.request, contextIsSecond=True)
+
diff --git a/compound/microart/configure.zcml b/compound/microart/configure.zcml
new file mode 100644
index 0000000..36e46c9
--- /dev/null
+++ b/compound/microart/configure.zcml
@@ -0,0 +1,29 @@
+