[opencms-dev] templates with xml content

Gonzalez, Arnau (GE Consumer Finance, consultant) arnau.gonzalez at ge.com
Tue Sep 6 11:50:00 CEST 2005


Thanks, the problem was that I was using the directive <base> to locate some images and I suppose that this changed the paths that opencms uses for its buttons.

-----Mensaje original-----
De: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org]En nombre de Wolfgang Winzer
Enviado el: lunes, 05 de septiembre de 2005 18:09
Para: The OpenCms mailing list
Asunto: Re: [opencms-dev] templates with xml content


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
>
>  
>



_______________________________________________
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