Hi guys, 
is it possible to have an arbitrary number of areas defined "on-the-fly" in a 
template? I mean, without having a JCR definition in place..

Magnolia 4.4.x allows this: 

[code]

[#list 1..9 as areaCount]

  [@cms.contentNodeIterator contentNodeCollectionName="mainArea"+areaCount]
    [@cms.includeTemplate /]
  [/@cms.contentNodeIterator]
  [@cms.newBar contentNodeCollectionName="mainArea"+areaCount 
newLabel="${i18n['paragraphs.teaser.group.newLabel']}" 
paragraph="${stk.asStringList(def.mainArea.paragraphs)}" /]        

[/#list]
[/code]


This snippet allow the management of 9 main areas, all of course defined in the 
same way in JCR config. 
But this allows a pattern like the following: 
[code]
[#if content.showArea1]
[@cms.contentNodeIterator contentNodeCollectionName="mainArea1"]
    [@cms.includeTemplate /]
  [/@cms.contentNodeIterator]
  [@cms.newBar contentNodeCollectionName="mainArea1 
newLabel="${i18n['paragraphs.teaser.group.newLabel']}" 
paragraph="${stk.asStringList(def.mainArea.paragraphs)}" /]
[/#if]

[#if content.showArea2]
[@cms.contentNodeIterator contentNodeCollectionName="mainArea2"]
    [@cms.includeTemplate /]
  [/@cms.contentNodeIterator]
  [@cms.newBar contentNodeCollectionName="mainArea2 
newLabel="${i18n['paragraphs.teaser.group.newLabel']}" 
paragraph="${stk.asStringList(def.mainArea.paragraphs)}" /]
[/#if]

...
[/code]

.., where the editor choose wich area (and which content) to show in the page, 
according to page properties / paragraph properties..

Is this use case covered in Magnolia 5?

Many thanks..
M.

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=443fe42e-e5a8-4a6d-bdd0-382e32f61bf3


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to