[opencms-dev] Problem with adding structured content fromfrontend
Schliemann, Kai
K.Schliemann at comundus.com
Wed Jun 23 07:38:11 CEST 2010
Hi Yves,
please use news_%(number) instead of news_${number}.
HTH
Regards
_________________________________________
Kai Schliemann
Senior IT-Berater
comundus GmbH
Schüttelgrabenring 3, D-71332 Waiblingen
Telefon +49 7151-50028-0
E-Mail k.schliemann at comundus.com
Internet www.comundus.com
Geschäftsführer Klaus Hillemeier
Amtsgericht Stuttgart, HRB 264290
comundus ist ein Unternehmen der IT EXCELLENCE Group
_________________________________________
Die Kundenzufriedenheit bei comundus wieder verbessert -
Durchschnittsnote jetzt 1,7.
-----Ursprüngliche Nachricht-----
Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Yves Glodt
Gesendet: Dienstag, 22. Juni 2010 17:42
An: The OpenCms mailing list
Betreff: Re: [opencms-dev] Problem with adding structured content fromfrontend
Of course I forgot to post more info...
The "direct add" button works somehow, it created a new resource named
news_.html.
When I inspect the "direct add"-button, I see that in its form there
is a hidden input named "newlink" with the following value:
allInFolderDateReleasedDesc%257C%252Ffr%252Fnews%252Fnews_.html%257Cxmlcontent%257C3
Note also the missing number behind the underscore. This is also the
reason why creating works only once... (The next resource it wants to
create already exists, since the number is missing in its name)
On 22 June 2010 17:35, Yves Glodt <yg at mind.lu> wrote:
> 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>
>
_______________________________________________
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
http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list