Thanks a lot Sameer. This was exactly what I was looking for (... and just realized after I've
offered my brain a few hours of sleep ;-)). For the guys reaching the same problem as myself one
nice thing to do, which may help is to export some different nodes and take a look those XML files.
The next question which I consider related to this is how you describe when creating a new template
which info belongs to which node type and what is the set of properties available to each node type.
Or this is this related to UI custom controls?
thanks in advance,
./alex
--
.the_mindstorm.
#: Sameer Charles changed the world a bit at a time by saying on 9/19/2005
9:31 AM :#
Hi Alex
I will try to explain in short
magnolia cms defines 2 custom node types in JCR as you have noticed
mgnl:content and mgnl:contentNode
there are different ways how java content repositories might allow
these definitions, with jackrabbit its quite straight forward - you can
define these node types
to be registered in customnodetypes.xml under repository or via
jackrabbit api,
How its done in magnolia :
Definition:
- magnolia defines basic node types in customnodetypes.xml, you are
free to add as many as you want to be used in your templates.
How its used:
- mgnl:content and mgnl:contentNode are generic types defined as
"folder" which can have a hierarchy.
- magnolia uses mgnl:content to define a "page" and mgnl:contentNode to
define "paragraphs"
- from API point of view magnolia only has object "Content" which could
either refer to a page or to a paragraph differentiated by its type
(jcr type)
On content aggregation:
- If a request is for a page, it simply builds a content object using
mgnl:content node from the jcr as stored on the requested uri
this is not a complete page aggregation but only a top level object is
being created, once this is done and request is dispatched to the
template its a responsibility of a template
to retrieve/display rest of the content because this could vary based
on your template definition. template uses info.magnolia.cms.taglibs to
achieve this or custom code
- If a request is for a resource (images, files..) which are stored in
magnolia as NodeData (JCR Property) under either mgnl:content (directly
under the page /home/myImage.jpg)
or mgnl:contentNode (under a paragraph
/home/columnOne/para1/myImage.jpg).
in JCR structure would look like this:
assuming home, en and index are pages
- home [ mgnl:content ]
- en [ mgnl:content ]
- index [ mgnl:content ]
- leftParagraphCollection [ mgnl:contentNode ]
- 0001 [ mgnl:contentNode ]
- title [ jcr:property ] String
- text [ jcr:property ] String
- image [ jcr:property ] Binary
- 0002 [ mgnl:contentNode ]
- link [ jcr:property ] String
- image [ jcr:property ] Binary
- rightParagraphCollection [ mgnl:contentNode ]
- 0001 [ mgnl:contentNode ]
- .....
- jp
- .....
hope this helps
regards
- Sameer
On Sep 19, 2005, at 3:38 AM, Alexandru Popescu wrote:
Hi!
Probably my mind got finally confused after trying to push so much
info lately; so I have reached a point where I cannot understand how
the website repository is organized in terms of node types.
The confusion seems to have started after looking at Agregator class.
There, there are manipulated 2 different `resources´ (how should I
call them: nodes? according to the request URI. There is also a node
whose name is computed by adding _properties.).
I have also noted that Magnolia defines to custom node types:
mgnl:content and mgnl:contentNode.
So, my question is: can anybody help me understand how the mapping
between the JSR170 node types and the information stored/managed by
Magnolia is done?
I think that the answer is quite long, so I will double from the start
my thanks,
./alex
--
.the_mindstorm.
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------