I'm including an offsite document in my Website 2.6.0 layout. However, some -generated tocs do not link to it when I specify its location with a relative path.

For example, in this layout the second tocentry specifies an offsite document that is to be found in the output-root directory.

<layout>
  <toc filename="home.html" page="home.xml">

    <tocentry dir="subdir" filename="page.html" page="subdir/page.xml">
      <title>Sub page</title>
    </tocentry>

    <tocentry id="offsite" href="offsite.html">
      <title>Non Webpage doc</title>
    </tocentry>

  </toc>
</layout>

But in generated pages, the navtoc always links to the offsite document using href="offsite.html". So the link is correct in home.html, but incorrect in page.html (it should have 'href="../offsite.html"'.

Looks to me like the problem is in page.uri (in website-common.xsl) where it handles offsite tocentry hrefs:

  <xsl:variable name="html.href">
    <xsl:choose>
      <xsl:when test="$href != ''">
        <xsl:value-of select="$href"/>
      </xsl:when>

Replacing the fourth line with this seems to work ok:

        <xsl:value-of select="concat($relpath,$href)"/>


Shall I file a bug, or is this user error??

Thanks,
Denis

P.S.: The same problem occurs with Prev and Next buttons if you turn on sequential.links. I haven't figured out yet why the fix above doesn't
fix those links too...

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to