[opencms-dev] Problem with adding structured content from frontend
Yves Glodt
yg at mind.lu
Tue Jun 22 17:35:44 CEST 2010
Hi,
I have a problem adding new structured content from the frontpage. I
have the direct edit buttons which works well for edit and delete, but
not for add.
My resources are set up to be named news_1.html etc.
Thanks in advance for any hint... :-)
Here is the contentload tag which displays the news:
<cms:contentload collector="allInFolderDateReleasedDesc"
param="/${currentLocale}/news/news_${number}.html|xmlcontent|3"
editable="true">
And here the xsd:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
http://opencms-wiki.org/HtmlWidget
-->
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
<xsd:element name="Articles" type="OpenCmsArticles"/>
<xsd:complexType name="OpenCmsArticles">
<xsd:sequence>
<xsd:element name="Article" type="OpenCmsArticle" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsArticle">
<xsd:sequence>
<xsd:element name="Title" type="OpenCmsString" />
<xsd:element name="Teaser" type="OpenCmsString" minOccurs="0" maxOccurs="5"/>
<xsd:element name="Image" type="OpenCmsVfsFile" minOccurs="0"
maxOccurs="1" />
<xsd:element name="Text" type="OpenCmsHtml" />
<xsd:element name="Links" type="OpenCmsVfsFile" minOccurs="0"
maxOccurs="5" />
<xsd:element name="Release" type="OpenCmsDateTime" />
<xsd:element name="Author" type="OpenCmsString" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="required"/>
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<resourcebundle name="com.alkacon.documentation.xmlcontentdemo.workplace"/>
<mappings>
<mapping element="Title" mapto="property:Title" />
<mapping element="Release" mapto="attribute:datereleased" />
</mappings>
<validationrules>
<rule element="Title" regex="!.*[Ee]rror.*"
message="${key.editor.errormessage.Article.mustnotcontainerror|${validation.path}}"
/>
<rule element="Title" regex="!.*[Ww]arn.*" type="warning"
message="${key.editor.warning.Article.mustnotcontainwarn|${validation.path}}"/>
<rule element="Teaser" regex="!.*[Ww]arn.*" type="warning"
message="${key.editor.warning.Article.mustnotcontainwarn|${validation.path}}"/>
<rule element="Text" regex="!.*[Ww]arn.*" type="warning"
message="${key.editor.warning.Article.mustnotcontainwarn|${validation.path}}"/>
</validationrules>
<defaults>
<default element="Title" value="${key.editor.defaults.Article.Title}"/>
<default element="Teaser" value="${key.editor.defaults.Article.Teaser}"/>
<default element="Release" value="${currenttime}"/>
<default element="Author" value="${currentuser.fullname}"/>
</defaults>
<layouts>
<layout element="Text" widget="HtmlWidget"
configuration="source,link,anchor,formatselect,image,table,imagegallery,downloadgallery,linkgallery,htmlgallery,tablegallery,height:400px"
/>
</layouts>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
More information about the opencms-dev
mailing list