Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SUSE header to avoid issues with new+old header code #571

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions suse2022-ns/xhtml/chunk-common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -257,23 +257,27 @@
<body>
<xsl:call-template name="body.attributes" />
<xsl:call-template name="outerelement.class.attribute" />
<xsl:if test="$include.suse.header">
<xsl:variable name="candidate.suse.header.body">
<xsl:call-template name="string.subst">
<xsl:with-param name="string" select="$include.ssi.body" />
<xsl:with-param name="target" select="$placeholder.ssi.language" />
<xsl:with-param name="replacement" select="$lang-attr" />
<xsl:choose>
<xsl:when test="number($include.suse.header) = 1">
<xsl:variable name="candidate.suse.header.body">
<xsl:call-template name="string.subst">
<xsl:with-param name="string" select="$include.ssi.body" />
<xsl:with-param name="target" select="$placeholder.ssi.language" />
<xsl:with-param name="replacement" select="$lang-attr" />
</xsl:call-template>
</xsl:variable>
<xsl:text>&#10;</xsl:text>
<xsl:comment>#include virtual="<xsl:value-of select="$candidate.suse.header.body" />"</xsl:comment>
<xsl:text>&#10;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="bypass">
<xsl:with-param name="format" select="'chunk'" />
</xsl:call-template>
</xsl:variable>
<xsl:text>&#10;</xsl:text>
<xsl:comment>#include virtual="<xsl:value-of select="$candidate.suse.header.body" />"</xsl:comment>
<xsl:text>&#10;</xsl:text>
</xsl:if>
<xsl:call-template name="bypass">
<xsl:with-param name="format" select="'chunk'" />
</xsl:call-template>

<xsl:call-template name="user.header.content" />
<xsl:call-template name="user.header.content" />
</xsl:otherwise>
</xsl:choose>

<xsl:call-template name="breadcrumbs.navigation" />

Expand Down
31 changes: 16 additions & 15 deletions suse2022-ns/xhtml/docbook.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -755,14 +755,17 @@
<xsl:call-template name="body.attributes"/>
<xsl:call-template name="outerelement.class.attribute"/>

<xsl:if test="$include.suse.header">
<xsl:text>&#10;</xsl:text>
<xsl:comment>#include virtual="<xsl:value-of select="$candidate.suse.header.body"/>"</xsl:comment>
<xsl:text>&#10;</xsl:text>
</xsl:if>
<xsl:call-template name="bypass"/>

<xsl:call-template name="user.header.content"/>
<xsl:choose>
<xsl:when test="number($include.suse.header) = 1">
<xsl:text>&#10;</xsl:text>
<xsl:comment>#include virtual="<xsl:value-of select="$candidate.suse.header.body"/>"</xsl:comment>
<xsl:text>&#10;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="bypass" />
<xsl:call-template name="user.header.content" />
</xsl:otherwise>
</xsl:choose>

<xsl:call-template name="breadcrumbs.navigation"/>

Expand Down Expand Up @@ -915,13 +918,11 @@ if (window.location.protocol.toLowerCase() != 'file:') {
</xsl:call-template>
</xsl:variable>

<xsl:if test="$include.suse.header = 0">
<header id="_mainnav">
<div class="growth-inhibitor">
<xsl:call-template name="create.header.logo"/>
</div>
</header>
</xsl:if>
<header id="_mainnav">
<div class="growth-inhibitor">
<xsl:call-template name="create.header.logo" />
</div>
</header>
</xsl:template>

<xsl:template name="user.footer.content">
Expand Down