Page-templates and csm:editable

Hein van der Kallen via opencms-dev <[email protected]>
Newsgroups gmane.comp.cms.opencms.devel
Message-ID <[email protected]>
Alkacon, 

In Opencms 7 the preferred way to create a webpage was with a xml-content
type and a page-template. 

In the resourcetype of your xml-content you define a template-elements
definition pointing to your page template. 

Now in every folder where an author has write permission your user can
create a new xml-content, that points to your page template. And after
publishing, the page is created using only the xml-content and the
page-template. 

Moreover if you use <cms:editable> in your page template, the logged-in user
can, in display mode,  see a working edit button to edit his xml-content. 

See:
http://www.opencms-wiki.org/wiki/Defining_OpenCMS_structured_XML_content

 

If you had xmlpages and followed the excellent conversion strategy from
Michael Emmerich in 

https://www.slideshare.net/AlkaconOpenCms/opencms-days-2013-how-to-update-sm
oothly-to-opencms-9ms-9 

you would end up with a new xml-content type using <cms:editable> and a
page-template with an included head and foot. ( you "only" had to write a
suitable conversion program for your xmlpages). 

 

I consider page-templates and <cms:editable> the easiest and best design for
most websites. 

The author writes his story in one xml-content and publishes it, the
designer makes sure that everything needed around that story is generated in
the included head and foot. 

( the base template for the head and foot can use the location of the
xml-content to show different content in the head and foot depending on that
location). 

 

Yes, you can also create a container template with the same head and foot,
using <cms:enable-ade> 

And you can add formatters and a module config to your xml-content types. 

Then you can use ADE and container pages. As Alkacon prefers starting from
Opencms 8. 

But that design is way more complicated. I tried it, but never found it
better. 

And I never found a good conversion strategy for existing content.  

 

In opencms 10 and opencms 11 page-templates and <cms:editable>  work if in 

Your site root (sites/default) you put no template property and 

In /sites/default/.content/config you only state that you use no (ade)
types:

 

You put in /sites/default/.content/config

<?xml version="1.0" encoding="UTF-8"?>

 

<SitemapConfigurations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="opencms://system/modules/org.opencms.ade.conf
ig/schemas/sitemap_config.xsd">

  <SitemapConfiguration language="en">

    <DiscardTypes>true</DiscardTypes>

  </SitemapConfiguration>

</SitemapConfigurations>

 

In lower folders I can then make subsites using containerpages and ADE. 

 

In opencms 13 Page-templates and <csm:editable> DO NOT work anymore as
desired:

The editor buttons in display mode don't work any more : when clicked they
show "Cannot be created or edited"

And when I delete the .content directory or add my xml-content types to the
/sites/default/.content/config then when I create a new xml-content opencms
will suggest to place it by default in the .content directory , what I did
not had and do not want. 

Alkacon :

1.	Will you continue to support a design where at least a part of the
pages is generated using Page-templates and <cms:editable> ? ( It is never
declared deprecated, but the new documentation with opencms 14 does an
excellent job in hiding this design possibility.)
2.	What is the preferred way to keep Page-templates and <csm:editable>
working as it was ? 

3.	Will you keep hiding this solution, which some of your users still
consider the best design?

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
https://lists.opencms.org/mailman/listinfo/opencms-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.