[MAGNOLIA-2402] Add a property to Paragraph Configuration, which contains the path to a Data Module node Created: 30/Sep/08 Updated: 04/Nov/08 Resolved: 04/Nov/08 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Giancarlo Berner | Assignee: | Magnolia International |
| Resolution: | Not an issue | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| 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 |
|
We often need to add additional information to a paragraph (e.g. some design information, help pages, etc.). We typically put this information into the Data module and add a reference to the Paragraph (usually a search for a node with the same paragraph name). We suggest adding a new property to the paragraph configuration, similar as "dialogPath" (e.g. "dataPath", "dataModulePath", "configPath" or whatever) where the value is a path to a Data Module node, similar as for dialogPath. Of course this property can be added individually without any Magnolia extension. The idea though is to add a method to the Paragraph class, similar as getDialogPath() and make it easy to identify the Data Module node with additional (custom) settings. |
| Comments |
| Comment by Magnolia International [ 30/Sep/08 ] |
|
Paragraphs are instanciated using content2bean, so you're free to have anything you want in there, you just need to provide a specific class property to use your custom Paragraph implementation. It wouldn't make sense to make this a default property of the Paragraph class, since that would introduce a dependency to the data module in the core codebase. |
| Comment by Giancarlo Berner [ 30/Sep/08 ] |
|
Thanks a lot! Makes absolutely sense. I had in mind to log an error or warn message if the data module node (or the module per se) was not available. |
| Comment by Magnolia International [ 30/Sep/08 ] |
|
Also, with |
| Comment by Magnolia International [ 09/Oct/08 ] |
|
So can we close this? Maybe you want to provide a patch/enhancement for the data module? |
| Comment by Magnolia International [ 04/Nov/08 ] |
|
As from 3.7, paragraphs and templates can have arbitrary properties and/or be based on beans instanciated with content2bean. See linked issues for details. |