Manual for graphical migration from version 2.6.2 to version 2.6.3

Migration of the training research service

Please note that this migration also requires a technical migration Manual for technical migration from version 2.6.2 to version 2.6.3


The "Show routes" service parameter has been modified. It is no longer a Boolean, but a drop-down list with 4 possible options:

  • none: do not display routes
  • all: display all routes
  • matching_search_only: display only routes matching search criteria
  • all_with_highlight: display all routes, highlighting those that match the search criteria

In your overloads, look for places where you use the parameter <xsl:param name="displaySubProgram" select="ametys:serviceParameter('displaySubProgram')"/>
The value is no longer "true" or "false", but one of the 4 values listed above.

Route display

In the search results, the logic for displaying routes has therefore evolved to take into account the 4 possible values:

  • none: routes are not available at XML .
  • all: the courses are all available at XML , you can display them under the course.
  • matching_search_only: only courses matching the search criteria are available at XML . You can display them below the course.
  • all_with_highlight: all routes are available in the input XML , but those with the "highlight " attribute are those that meet the search criteria, so you can customize the display between those that meet the criteria and others.

You have 3 additional XSL templates to manage the display of routes, which you can use or override as you wish:

	<xsl:template name="hit-subprograms">
        <xsl:param name="class">custom</xsl:param>
        <xsl:if test="$displaySubProgram != 'none' and subprogram">
			<!-- Parcours répondant aux critère de recherche -->
			<xsl:if test="subprogram[not(@highlight) or @highlight = 'true']">
                <ul class="{$class} subprogram">
                    <xsl:for-each select="subprogram[not(@highlight) or @highlight = 'true']">
                           <xsl:if test="@highlight = 'true'"><xsl:attribute name="class">highlight</xsl:attribute></xsl:if>
                           <xsl:call-template name="hit-subprogram" />
			<!-- Autres parcours -->
            <xsl:call-template name="hit-subprograms-others">
                <xsl:with-param name="class" select="$class"/>
    <xsl:template name="hit-subprograms-others">
        <xsl:param name="class">custom</xsl:param>
        <xsl:if test="$displaySubProgram = 'all_with_highlight' and subprogram[@highlight = 'false']">
            <div class="other-subprograms">
                <a class="collapsed" href="#" onclick="$j(this).toggleClass('collapsed')">
                            <xsl:when test="subprogram[@highlight = 'true']">
                                <i18n:text i18n:key="PLUGINS_ODFWEB_SERVICE_SEARCH_NOT_MATCHING_SUBPROGRAM_OTHERS" i18n:catalogue="plugin.odf-web"/>   
                                <i18n:text i18n:key="PLUGINS_ODFWEB_SERVICE_SEARCH_NOT_MATCHING_SUBPROGRAM_SEE" i18n:catalogue="plugin.odf-web"/>   
                <ul id="other-subprograms-{$uniqueId}-{position()}" class="{$class} subprogram others">
                    <xsl:for-each select="subprogram[@highlight = 'false']">
                           <xsl:call-template name="hit-subprogram" />
    <xsl:template name="hit-subprogram" >
            <xsl:attribute name="href">
                <xsl:call-template name="hit-href">
                    <xsl:with-param name="url" select="concat(../uri, '/', @path)"/>
            <xsl:value-of select="@title"/>

Display example :

To display/hide "other" routes, click on the "View routes" link and add the following to your list CSS

.other-subprograms a.collapsed + ul { display: none }
.other-subprograms > a > span:before {content: '« '}
.other-subprograms a.collapsed > span:before { content: '» '}
Back to top