On Dec 5, 2006, at 10:42 PM, Jacopo Cappellato wrote:
David,
thanks for the insight, it really helps me; please see my comments
inline:
David E Jones wrote:
I believe a few descriptions of the CompDoc stuff were sent out to
the mailing lists as they were developed and contributed. A search
of that should get you some quick results.
Thanks, I will do some researches.
Unless you're seeing something I'm not aware of a Template is just
a template.
So, the definition of a "template" is a Content entry of type
"TEMPLATE"; is this correct? This means that in the "Find Layout"
and "List Layout" screens (not sure about the difference between
them) should only show the Content entries of type = TEMPLATE.
This is tricky... Looking at the data and code briefly what I though
this was doing is not quite what it is doing. I guess it is looking
at content associated with the Content record with ID
"TEMPLATE_MASTER". I'm not sure doing it this way is the best idea...
I like the idea of doing it be a type better than by an association
with a certain record. If there are too many of that type, then we
should move to only a find screen or something to handle the volume.
The Layout editor thing is meant to edit a template Content whose
dataResourceId points to the template text (in FTL) and then uses
ContentAssoc records to tie it to things that will be inserted in
different parts of the template. So, a given template can be used
for multiple layouts, each with it's own content inserted in the
different places.
Are the demo data in http://svn.apache.org/repos/asf/incubator/
ofbiz/trunk/applications/content/data/TemplateData.xml
a good example of how templates should be setup?
I cannot see in it any content of "TEMPLATE" type, nor any
ContentAssoc entries... Is there a good example of demo data for a
template (including Content/ContentAssoc/DataResource entries)?
It looks like this has some of the basic stuff, almost more seed data
plus who knows what data. It would be great to have a real example of
this stuff.
The ContentAssoc with a map key pattern that is used to fill in place
holders in a template is a pretty common one. That is used for
rendering sub-content as well, like in the "policies" screen in
CommonScreens.xml in the ecommerce component.
Anyway, those are some general thoughts that are hopefully helpful.
It's great to see some more attention going into this.
-David