[MAGNOLIA-5150] Don't render cms comments for areas in preview, add JSON mimetype Created: 03/Jul/13  Updated: 27/Aug/13  Resolved: 27/Aug/13

Status: Closed
Project: Magnolia
Component/s: rendering, templating
Affects Version/s: 4.5, 5.0
Fix Version/s: 4.5.11, 5.0.3, 5.1

Type: Improvement Priority: Neutral
Reporter: Roman Kovařík Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
is causing MAGNOLIA-5270 Don't render cms comments for compone... Closed
dependency
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   

Add JSON support so that Magnolia pages can be used to manage JSON pages. These problem have to be resolved:

1. Magnolia does not include the application/json mimetype by default.
2. If page template renders JSON instead of HTML - In the preview mode of the author instance Magnolia always renders HTML comments and these are not valid JSON.
3. Magnolia themes by default only support JS, CSS and images and not other resources such as JSON files.

See SUPPORT-2515 for details.



 Comments   
Comment by Roman Kovařík [ 16/Aug/13 ]

3. Magnolia themes by default only support JS, CSS and images and not other resources such as JSON files.

Magnolia supports only these default resources by default, please extend info.magnolia.module.templatingkit.style.ThemeImpl, add your custom resources and point type-mapping to your new class:

/magnolia-module-standard-templating-kit/src/main/resources/META-INF/magnolia/standard-templating-kit.xml:

...
<type-mapping>
      <type>info.magnolia.module.templatingkit.style.Theme</type>
      <implementation>info.magnolia.module.templatingkit.style.ThemeImpl</implementation>
    </type-mapping>
...
Comment by Milan Divilek [ 27/Aug/13 ]

Reopen:

2. If page template renders JSON instead of HTML - In the preview mode of the author instance Magnolia always renders HTML comments and these are not valid JSON.

HTML comments (<!-- cms:component ... -->) for components are still presented.

Comment by Roman Kovařík [ 27/Aug/13 ]

Because this was already released as part of Magnolia 5.0.3...marked as closed and follow-up ticket MAGNOLIA-5270 created.

Ticket summary text was changed from:

Don't render cms comments in preview, add JSON mimetype

to:

Don't render cms comments for areas in preview, add JSON mimetype

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