[opencms-dev] FCKEditor and new Content

Oliver Berse oliver.berse at snsconsulting.de
Wed Sep 2 13:42:25 CEST 2009


Hi all,

Nacho Fernández Orellana schrieb:
> If I am not mistaken, I think Achim was asking about how the template 
> property is set in your contents (on a resource by resource basis, by 
> containing folders?). You may have all your existing resources with 
> the template property correctly established (and therefore the 
> template "knows" where to locate your css) but a newly created one 
> won't have this property unless you establish it "manually" or it is 
> inherited (from a folder higher up in the hierarchy).
>
> Are your new contents inheriting the right "template" property? If 
> that is so, it should work by the mecanism mentioned earlier. Please 
> check if this helps you, hopefully it will. If not, I'm sure we (the 
> community) will dig deeper to help you. Greetings,

The folder for the structured content files has this template property:
/system/modules/my_module/templates/my_template.jsp

And the template property for my_template.jsp is:
/system/modules/my_module/resources/css/style_wysiwyg.css

But when a new content file is created in the content folder via new 
button (green cross icon) the editor does not show my styles. For a new 
file (via vfs) and for existing files the editor shows my styles.

Maybe there is something wrong with my schema?. I have configured the 
HtmlWidget. This is my schema:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified">
    <xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
    <xsd:include 
schemaLocation="opencms://system/modules/org.opencms.frontend.templatetwo.demo/schemas/nested/image.xsd"/>    

    <xsd:element name="FeMagTypes" type="OpenCmsFeMagTypes"/>
   
    <xsd:complexType name="OpenCmsFeMagTypes">
        <xsd:sequence>
            <xsd:element name="FeMagType" type="OpenCmsFeMagType" 
minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="OpenCmsFeMagType">
        <xsd:sequence>
            <xsd:element name="Headline" type="OpenCmsString" />
            <xsd:element name="Headline_zweizeilig" type="OpenCmsHtml" />
            <xsd:element name="Bild_Liste" type="OpenCmsTTImage" 
minOccurs="1" maxOccurs="1"/>
            <xsd:element name="Langtext" type="OpenCmsHtml" />
            <xsd:element name="Ordnung" type="OpenCmsString" />
            <xsd:element name="Anzeige_von" type="OpenCmsDateTime" 
minOccurs="0" />           
            <xsd:element name="Anzeige_bis" type="OpenCmsDateTime" 
minOccurs="0" />
        </xsd:sequence>
        <xsd:attribute name="language" type="OpenCmsLocale" use="required"/>
    </xsd:complexType>
   
    <xsd:annotation>
        <xsd:appinfo>
            <resourcebundle name="my_module.workplace_de"/>
            <layouts>
                  <layout element="Headline_zweizeilig" 
widget="HtmlWidget" configuration="source,link,formatselect" />
                  <layout element="Langtext" widget="HtmlWidget" 
configuration="source,link,formatselect,imagegallery,htmlgallery" />
            </layouts>
            <mappings>               
                <mapping element="Headline" mapto="property:Title" />
                <mapping element="Ordnung" mapto="property:NavPos" />
                <mapping element="Anzeige_von" 
mapto="attribute:datereleased" />
                <mapping element="Anzeige_bis" 
mapto="attribute:dateexpired" />
            </mappings>
            <defaults>
                <default element="Anzeige_von" value="${currenttime}"/>
                <default element="Anzeige_bis" value="${currenttime}"/>
            </defaults>
        </xsd:appinfo>
    </xsd:annotation>

</xsd:schema>




More information about the opencms-dev mailing list