CSS search engine results

This page should only be used if script asks you to manually migrate skin.20220201.search.css

Until now, CSS content was not taken into account in a "search engine" service in "Content" mode.
This is no longer the case since the correction of ticket CMS-9991.

If you have overloaded the template XSL "hit[@saxer = 'org.ametys.web.frontoffice.search.metamodel.impl.ContentSaxer']" you must apply the same correction.

Here's the core template involved, with the lineage added for the correction in bold (which you must also add to your overload).

Remember to check that your template overload is still necessary before modifying it in this way.

    <xsl:template match="hit[@saxer = 'org.ametys.web.frontoffice.search.metamodel.impl.ContentSaxer']">
        <xsl:param name="class"></xsl:param>
        <xsl:variable name="raw-is-title-visible">
            <xsl:call-template name="common-service-body-nonempty-content-title-content">
                <xsl:with-param name="title" select="/search/header"/>
        <xsl:attribute name="class">
            <xsl:apply-templates select="." mode="class-attribute"/>
        <xsl:copy-of select="content/html/head/link[@rel='stylesheet' and (not(@type) or @type='text/css')]|content/html/head/style"/>
        <xsl:apply-templates select="content/html/body/node()" mode="move-hierarchy">
            <xsl:with-param name="level">
                    <xsl:when test="$raw-is-title-visible != ''">2</xsl:when>
Back to top