[opencms-dev] templates with xml content
Wolfgang Winzer
wwinzer at ka-dus.de
Mon Sep 5 18:09:23 CEST 2005
Arnau Gonzalez,
I think your problem is in the <cms:contentload>-Tag. You use the macro
${opencms.uri} to specify the singleFile in which your xml-content is
located, but the macro will resolve to your current folder. Since the
folder is not a file (well, it is but not as far as your browser is
concerned), the string "/index.html" will automatically be appended to
the url. Thus, when you click the red box, OpenCms thinks it should open
/my/current/folder/index.html for edit.
You should be able to solve this by using
param="${opencms.uri}myContent.xml" in the contentload-tag.
Note that the omission of a slash ("/") between macro and filename is on
purpose.
Hope that helps
Wolfgang
Gonzalez, Arnau (GE Consumer Finance, consultant) wrote:
>That's fine, this way more people can read it. I only wrote in spanish because I supposed that Cayetano is an spanish speaker like me.
>
>I've done what you say until the part of adding the type and the workplace. I've created a xml content file and I can edit it right using the Edit option. But the main problem is that when I write these lines to the template:
>
> <cms:contentload collector="singleFile" param="${opencms.uri}" editable="true">
>
> <h1><cms:contentshow element="Title" /></h1>
>
> <cms:contentloop element="Teaser">
> <p><i><cms:contentshow /></i></p>
> </cms:contentloop>
>
> <p><cms:contentshow element="Text" /></p>
>
> </cms:contentload>
>
>(by now I am testing with the example in the documentation. The elements Title, Teaser and Text are well difined in the schema), the editon box appears in the page but on pressing the browser goes to an index.html#, which obiously doesn't find because it doesn't exist.
>
>Why it doesn't open the xml content editor?
>
>Thanks
>
>Arnau
>
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>
>
More information about the opencms-dev
mailing list