[MAGNOLIA-1294] Simplify external handling of Templates, Paragraphs and Dialogs Created: 07/Jan/07  Updated: 04/Nov/15  Resolved: 04/Nov/15

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

Type: New Feature Priority: Minor
Reporter: Oliver Lietz Assignee: Philipp Bärfuss
Resolution: Won't Do Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

This is an attempt to simplify the (external) handling of Templates, Paragraphs and Dialogs.

  • a Template, Paragraph and Dialog is represented by a human readable XML document (examples below)
  • the XML documents are valid against the appropriate schemas
  • the XML documents are imported into a running Magnolia instance and setup properly
  • they can be exported into a valid XML document from the repository

<?xml version="1.0" encoding="UTF-8"?>
<template version="3.0" xmlns="http://magnolia.info/xml/ns/3.0/template">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://magnolia.info/xml/ns/3.0/template http://magnolia.info/xml/ns/3.0/template.xsd"/>

<name>mytemplate</name>
<path>/templates/mytemplate.jsp</path>
<title>template.mytemplate.title</title>
<type>jsp</type>
<visible>true</visible>

</template>

<?xml version="1.0" encoding="UTF-8"?>
<paragraph version="3.0" xmlns="http://magnolia.info/xml/ns/3.0/paragraph">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://magnolia.info/xml/ns/3.0/paragraph http://magnolia.info/xml/ns/3.0/paragraph.xsd"/>

<name>myparagraph</name>
<description>paragraph.myparagraph.description</description>
<dialog>dialogNode</dialog>
<templatePath>/paragraph/paragraph.jsp</templatePath>
<title>paragraph.myparagraph.title</title>
<type>jsp</type>

</paragraph>

The system view is hard to read and blowed up by meta data. Maybe the document view makes handling easier but I was unable to find useful information and samples.

The goal is to share general templates between different clients and developers.



 Comments   
Comment by Magnolia International [ 07/Jan/07 ]

This could for instance make maintenance of bootstrap files much easier, and it could maybe be generalized to more concepts than just templates, paragraphs and dialogs: basically to all components that make an empty system useable and reproduceable.

This could maybe be implemented as a secondary import/export, or a kind of filter on the current one.

Comment by Oliver Lietz [ 07/Jan/07 ]

I did some work on making bootstrap files handling/modification easier. It wasn't accepted because Philipp thought property files are much handier (IMHO the XSL approach is more powerful - http://jira.magnolia.info/browse/MAGNOLIA-985).

So before coding on that I would like to gather opinions and hints to avoid useless work and make this a useful feature for all Magnolia users.

I share Grégory's opinion on bootstrap files.

Comment by Philipp Bracher [ 09/Jan/07 ]

I like the idea of defining what really belongs to a node and what not, but in my opinion a schema is not really the best approach. You do not necessarily work with bootstrap-files nor is it a good idea to externalize config definitions to xml files at any other place.

But we could achieve proper definitions by using proper jcr node types for dialogs, paragraphs, ...

Anyway the current config tree is more to look at as a jcr browser and properties editor. In future we need better solutions for creating dialogs, ...

We should create wizards including the proper validation.

Means even if it sounds good in the first place, I think this won't lead to a good solution in the sense of usability.

Comment by Oliver Lietz [ 09/Jan/07 ]

First there should be a way to share templates (config) between different instances with a minimum of data required in a human readable form. The meta data in a system view contains a lot of information which makes it difficult. The jcr: and mgnl: stuff is totally unrelated to data in a different instance (other client - whatever). But using general templates for different clients/instances is a common request.

If you setup a new instance you have to fiddle around with bootstrap files and it is a PITA with the existing method of using system views. You don't start from scratch with creating templates, paragraphs and dialogs for every new client.

The current way of creating templates, paragraphs and dialogs is sufficient for developers if you are able to reuse/import existing templates.

I prefer the Unix way of doing things with plain files instead of shiny wizards which deny direct access to all information.
Do you really want to go through all steps of a wizard when creating new templates? I don't think so. Imagine you are developing a new template and have always go through a wizard to change a single value which is on page three of the wizard. This is not a good solution in the sense of usability.

Whether you use Schema, RELAX NG, DTD or any other method of validating input there should be proper documentation of these options/properties. I start collecting relating information in the wiki because I was unable to find something useful in the source and the docs.

Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

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