[MAGNOLIA-1479] Refactor ParagraphRenderer/TemplateRenderer Created: 23/Apr/07  Updated: 23/Jan/13  Resolved: 26/Jan/09

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

Type: Improvement Priority: Major
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MAGNOLIA-1462 Create a freemarker-based paragraph r... Closed
is depended upon by MAGNOLIA-2545 Cleanup soft-dependency between gui c... Closed
relation
is related to MAGNOLIA-2381 provide an action for templates and p... Closed
is related to MAGNOLIA-2642 aggregation state: use current conten... Closed
is related to MAGNOLIA-1455 Remove usage of HttpServletRequest an... Closed
is related to MAGNOLIA-2369 Templates should be instanciated with... Closed
is related to MAGNOLIA-2370 Move Template/Paragraph related code ... Closed
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   

There is certainly room for improvement and removal of duplicate stuff. TemplateRenderer and ParagraphRenderer could be one single thing. Maybe Pages too.
Maybe Paragraph, Template and Pages would implement a common "Renderable" interface, for instance.
As Philipp mentionned, pages already have support for:

  • multiple actions
  • usage of commands
  • setting request parameters
  • simple template selection based on resolved view name


 Comments   
Comment by Magnolia International [ 23/Apr/07 ]

While we're there, we'll need:

  • filtering of allowed parameters (as ActionBasedParagraph allows now?)
  • validation of parameters (i like the annotations-based approach of webwork)
Comment by Magnolia International [ 16/Sep/08 ]

this is something we'll tackle for 3.7

Comment by Philipp Bracher [ 04/Oct/08 ]

Code streamlined, both templates / paragraphs work internally the same way and support actions (jsp / freemarker)

Comment by Magnolia International [ 08/Oct/08 ]

I like the AbstractRenderer / Renderable approach, but something bothers me about exception handling: haven't been able to pinpoint it exactly, but previously when a paragraph template had a syntax error, it was appear onscreen in this infamous ugly yellow background. Not cool in production but very useful while working on templates. Now all i get on screen is a RenderException from the page template, wrapping the paragraph's RenderException, but the actual freemarker error message is swallowed and only visible in the logs when scrolling furiously.

Comment by Magnolia International [ 26/Jan/09 ]

Done for templates & paragraphs.
(Admin) pages might come at a later stage, but that will probably be happening with 5.0 (new gui)

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