Hi Matteo

The approach you describe is surprisingly found in many projects, but it is definitely an approach you do not want to follow :-)

One of the main goals of a CMS is to delegate responsibility of content to the authors. That's also why Magnolia is so user/author friendly. This means though that you have to create a paragraph system which is very flexible, e.g. allowing the author to decide on his own where to add which paragraph.

Looking at your requirement I would try to use the beauty of the underlaying repository. Therefore one idea could be creating a so called "Micro Site" (pages which are not directly used in the Web site, so only for referencing). Each page could be build with a "News Title and Text" paragraph, plus a "News Image" paragraph. While you use the "News Title..." only once, you can create a "New Bar" to add unlimited "News Image" paragraphs.
That's how authors could prepare a News Article.

For the Web page you would create a "Select News Article" paragraph, which allows the author to select a "News Page" from the Micro Site. You store the reference to the News Page and the paragraph script would read the content (so title, text and the paragraph list of images/caption) and display them accordingly. The benefits are:
1) You can use the same News article in different places
2) If you have a change to the article, you do that in one place (Micro Site) and it will be reflected in all other Web pages referencing the article.

Hope that helps.

Giancarlo
www.xumak.com


On Aug 7, 2008, at 9:09 AM, Matteo Pelucco (Tinext) wrote:

Hi Magnolians!!

I've another question for you.

I have the following need:

"User should add n images and caption to a news", where n is an
unpredictable number (1, 2, 87...)

I want to have a dialogue like this:

ID (automatic assigned)
NewsTitle (txt)
NewsBody (RichTxt)
Image_1
Caption_1
Image_2
Caption_2
...
Image_N
Caption_N

How can I implement this behaviour? In normal "relational DB" I have
relationship between object.. How can Magnolia (or more in general, a
JCR environment) map object relations?

Thanks a lot for your ideas and suggestions..

Matteo

----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------



----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------

Reply via email to