FAQ on graphic integration


  1. No content or zone is selectable in the CMS
  2. I have a warning in my logs "The page [pageId1] cannot inherit the undefined zone [zoneName] of template [templateName] in skin [skinName] as asked for page [pageId1] in site [siteName]."
  3. Why do I get an error message starting with "The prefix must convert to a namespace ..."?
  4. How do you customize the default CSS classes for zone-item divs (first, even, last)?

No content or zone is selectable in the CMS

Occasionally, a graphic design problem prevents clicking on zone, content or service icons on CMS, for example, a header or footer that graphically (but transparently) passes over all zones.

To be sure of this, use an inspector and see which element prevents the image from being selected.

I have a warning in my logs "The page [pageId1] cannot inherit the undefined zone [zoneName] of template [templateName] in skin [skinName] as asked for page [pageId1] in site [siteName]."

This message means that in skin [skinName], you've defined a template [templateName] that doesn't have a zone named [zoneName]. So far, so good.

But it turns out that the [pageId2] page, the child of the [pageId1] ID page, uses a template with inheritance, and that this template is incorrectly configured.

We therefore need to analyze the template used by this child page and look at the inheritance clause: in general, the problem is that it's too generic.

See The template file.xml for more details.

Why do I get an error message starting with "The prefix must convert to a namespace ..."?

A function requiring the call of methods from CMS Ametys was used in a XSL file without defining the call to this method in the file header.

Add the expected name-space in the header of the XSL file. The names of these two elements are specified in the error message.

For example, on line 20, a call to the ametys method is made, but the method itself is not declared. Lines 4 and 5 of the corrected file declare the method.

File causing errorCorrected file
<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
        
    <xsl:import href="plugin:web://pages/services/filtered-contents/list_3.3.xsl"/>        
 
    <xsl:template name="rss">
        <xsl:if test="RSSFeedURL != ''">
            <div class="rss">
                <a>
                    <xsl:attribute name="href">
                        <xsl:value-of select="$site-uri-prefix"/>
                        <xsl:text>/</xsl:text>
                        <xsl:value-of select="RSSFeedURL"/>
                    </xsl:attribute>
                    <xsl:choose>
                        <xsl:when test="ametys:skinResources('img/rssicon.png')">
                            <img src="{ametys:skinURL('img/rssicon.png')}" i18n:attr="alt title" title="plugin.web:PLUGINS_WEB_SERVICE_FILTERED_CONTENTS_RSS_FEED_ALT" alt="plugin.web:PLUGINS_WEB_SERVICE_FILTERED_CONTENTS_RSS_FEED_ALT"/>
                        </xsl:when>
                        <xsl:otherwise>
                            <i18n:text i18n:key="PLUGINS_WEB_SERVICE_FILTERED_CONTENTS_RSS_FEED_ALT" i18n:catalogue="plugin.web"/>
                        </xsl:otherwise>
                    </xsl:choose>
                </a>
            </div>
        </xsl:if>    
    </xsl:template>  
</xsl:stylesheet>        
<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
        xmlns:ametys="org.ametys.web.transformation.xslt.AmetysXSLTHelper"
        exclude-result-prefixes="ametys">
        
    <xsl:import href="plugin:web://pages/services/filtered-contents/list_3.3.xsl"/>        
 
    <xsl:template name="rss">
        <xsl:if test="RSSFeedURL != ''">
            <div class="rss">
                <a>
                    <xsl:attribute name="href">
                        <xsl:value-of select="$site-uri-prefix"/>
                        <xsl:text>/</xsl:text>
                        <xsl:value-of select="RSSFeedURL"/>
                    </xsl:attribute>
                    <xsl:choose>
                        <xsl:when test="ametys:skinResources('img/rssicon.png')">
                            <img src="{ametys:skinURL('img/rssicon.png')}" i18n:attr="alt title" title="plugin.web:PLUGINS_WEB_SERVICE_FILTERED_CONTENTS_RSS_FEED_ALT" alt="plugin.web:PLUGINS_WEB_SERVICE_FILTERED_CONTENTS_RSS_FEED_ALT"/>
                        </xsl:when>
                        <xsl:otherwise>
                            <i18n:text i18n:key="PLUGINS_WEB_SERVICE_FILTERED_CONTENTS_RSS_FEED_ALT" i18n:catalogue="plugin.web"/>
                        </xsl:otherwise>
                    </xsl:choose>
                </a>
            </div>
        </xsl:if>    
    </xsl:template>  
</xsl:stylesheet>        

How do you customize the default CSS classes for zone-item divs (first, even, last)?

Since 3.7, zone-item divs carry additional CSS classes: first, even, last. These classes can be customized CSS. 

In a XSL template /skins/[skinName]/templates/[templateName]/stylesheets/template.xsl or in a XSL common to all templates (e.g. /skins/[skinName]/stylesheets/main.xsl on the demo chart) add the template "zone-item-class". Here's its default value:

<xsl:template name="zone-item-class">
    <xsl:if test="position() mod 2 = 0"><xsl:text>even </xsl:text></xsl:if>                                
    <xsl:if test="position() = 1"><xsl:text>first </xsl:text></xsl:if>
    <xsl:if test="position() = last()"><xsl:text>last</xsl:text></xsl:if>
</xsl:template>

 

 


Back to top