This page should only be used if the assisted migration script asks you to pass the manual migration code.20250718.INTRANETSEARCH.InternalLinks
From version 2.8.0 onwards, the Intranet Search charter supports internal links/applications.
A directory link is "internal" as soon as an IP address range is defined in the "IP restriction" site parameter of the "Link directory" category and an internal url , and only an internal url, is defined for a link.
Outside the internal IP range, the link must therefore be inactive.
Inactive links are saxed with the "disabled" attribute.
Until now, these links were not managed by the graphic charter.
This is now the case with the following rules:
This migration is recommended but not mandatory if the notion of internal link is not used.
If you've landed on this page, it's because your charter overloads at least one of the following XSL templates:
For the first 3, the migration is very simple, it consists in filtering links on the "disabled" attribute.
For example, replace:
<xsl:apply-templates select="/cms/inputData/linkDirectory[@id='topMenu']/links/link" mode="top-links">
by
<xsl:apply-templates select="/cms/inputData/linkDirectory[@id='topMenu']/links/link[not(@disabled)]" mode="top-links">
The href, title and target attributes are now handled in three separate templates:
<xsl:apply-templates select="." mode="app-href-attr"/> <xsl:apply-templates select="." mode="app-title-attr"/> <xsl:apply-templates select="." mode="app-target-attr"/>
The disabled nature of links is handled in these templates. The calculation of href, title and target must therefore be replaced by a call to these templates:
<a data-list-link="" class="ametys-tools-list__link" data-serverid="{@id}">
<xsl:attribute name="title">
<xsl:choose>
<xsl:when test="@alternative != ''"><xsl:value-of select="@alternative"/></xsl:when>
<xsl:otherwise><xsl:value-of select="@title"/></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="@urlType = 'PAGE'">
<xsl:value-of select="resolver:resolve('page', @url)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@url"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:if test="@urlType != 'PAGE'"><xsl:attribute name="target">_blank</xsl:attribute></xsl:if>
<!-- [...] -->
</a>becomes
<a data-list-link="" class="ametys-tools-list__link" data-serverid="{@id}">
<xsl:apply-templates select="." mode="app-href-attr"/>
<xsl:apply-templates select="." mode="app-title-attr"/>
<xsl:apply-templates select="." mode="app-target-attr"/>
<!-- [...] -->
</a>JIRA ticket: https: ametys