[MAGNOLIA-2281] Import paragraphCollections from multiple modules into one paragraph collection Created: 23/Jul/08  Updated: 02/Dec/13  Resolved: 02/Dec/13

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 3.6.1
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Vasko Gjurovski Assignee: Unassigned
Resolution: Outdated Votes: 1
Labels: None
Remaining Estimate: 3d
Time Spent: Not Specified
Original Estimate: 3d

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Currently the mechanism for importing module specific paragraph collections (js and css files as well) is to define the Helper bean and import it into the head of the template via <jsp:useBean.... If we want to import paragraph collections (js and css files as well) we should make multiple <jsp:useBean.. imports along with the js and css importing for each module. This leads to a lot of problems when we have something like 20 modules (for example I need each paragraph to be a single module so I can vary them into different applications) which would lead in to a mess in the code. I am suggesting to make some kind of mechanism that will gather the paragraph collections (js and css as well) from all modules (if they have it) and use them like one collection. I have an idea how to solve this, but needed a approval that it has not been looked at yet and that nobody has tried anything similar, and also, that this agrees with your perspectives and ideas for the modules.

Best Regards,
Vasko Gjurovski



 Comments   
Comment by Magnolia International [ 23/Jul/08 ]

Keep in mind that the helper bean in samples is just that, a sample. Before introducing this, the sample templates simply showed that you could have a comma separated list of paragraphs to be shown.

The core of the issue is that there is no single silver solution that will satisfy all scenarios. In certain templates or sections of templates, you'll want to only have a limited set of paragraphs, and a different set for other templates. (because authors don't want to have to search for the right paragraph, or because you want to precisely control what can be added where)

Comment by Vasko Gjurovski [ 23/Jul/08 ]

Yes, I have thought of that and the answer is simple: you can always have a different paragraph collections for different purposes which you can as well define in the module. For example, if you have par1 and par2 from module1 and par3 and par4 from module2, you can make col1 which includes par1 and par3 and col2 which includes par2 and par4. And of course you can have any combination you like, as long as you define the same paragraphCollection name in all the modules (or include both paragrapCollections comma separated ). After that you can use the different paragraphCollection in different templates of sections of templates.
So my main point not to avoid the paragraphCollection node in config but to simply manage a more simple way of collecting ALL the paragraphs and then distributing them into the paragraphCollections as you wish.
Then again, perhaps there should be some part in adminCentral that can manage the paragraphCollections globaly (or per site, which has not yet been defined in Magnolia), but thats another story...

Generated at Mon Feb 12 03:35:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.