[DOCU-1114] Renderers can be defined with YAML too Created: 17/Aug/17  Updated: 08/Dec/17  Resolved: 08/Dec/17

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Christoph Meier Assignee: Christoph Meier
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File yaml-vs-jcr-configin-a-box.png    

 Description   

Renderers can be defined with YAML too.

This is possible since Magnolia 5.4! See MAGNOLIA-6070.

Update the docs and show how to configure a renderer.

Path to define a renderer is:
/<my-module>/renderers/<renderer-name>.yaml

Also mention that renderers registered the old way via JCR and in the Magnolia core module renderer are in the renderer registry too (which can be checked via Definition app).

Also mention that since Magnolia 5.5.6 it is very easy to create a new renderer with YAML inherit.

See https://documentation.magnolia-cms.com/display/DOCS56/Renderers
and https://documentation.magnolia-cms.com/display/DOCS55/Renderers
and https://documentation.magnolia-cms.com/display/DOCS54/Renderers



 Comments   
Comment by Richard Gange [ 29/Nov/17 ]

Also mention that renderers registered the old way via JCR and in the Magnolia core module renderer are in the renderer registry too (which can be checked via Definition app).

I don't think there are any renderers in the Core Module. They can be found in the Rendering Module.

Comment by Christoph Meier [ 30/Nov/17 ]

In the config section of the "Renderer" pages (56, 56), you start with a YAML example which inherits.
I would not start an example which inherits - even if that's a common use case in the context of the renderer here.
-
Instead I would prefer what we usually do when an item can be configured with both YAML and JCR (see screenshot of the template def. example).
-
However ... given the context. I should not be too picky.
mdrapela - what's your opinion here?
You follow the style guide a bit more strict than me, and a bit less strict than Julie ... so your opinion could be a nice compromise.

Comment by Martin Drápela [ 30/Nov/17 ]

Yes, if JCR is still a feasible way to configure sth in this case, I would probably add the "usual" YAML/JCR config box.

Comment by Richard Gange [ 04/Dec/17 ]

Ok, I can change it. I thought the idea was to show it can be done in YAML. What do you suggest as an example to be shown?

Comment by Christoph Meier [ 04/Dec/17 ]

To keep it "easy" you could define the exactly same thing as we already show via JCR.
Or something similar.

When comparing both YAML and JCR on this "special" tabs macro ... we typically show an identical config.

Comment by Richard Gange [ 04/Dec/17 ]

Edited sections:

  • Configuring a renderer: mentioned the Definitions app for 5.5 and 5.6
  • FreeMarker renderer: Showed YAML and JCR versions
  • Using the inherit feature: new section for 5.5.6+ and 5.6
Comment by Christoph Meier [ 08/Dec/17 ]

Ok..
After Julies latest edits ... I was applying ot to DOCS55 and DOCS54 with some minor changes where required.
I close it now.

Generated at Mon Feb 12 01:15:15 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.