Re: [PATCH 1/3] docs: fix 404 page when fetched from different location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/09/2012 08:17 AM, Martin Kletzander wrote:
> Error 404 page had relative paths specified for both the image and
> stylesheets which caused a problem when requested URL included a
> subfolder (e.g. http://libvirt.org/asdf/asdf ). This patch corrects
> this behaviour by modifying href_base to '/' and changing the src of
> the image.
> ---
>  docs/404.html.in |    2 +-
>  docs/site.xsl    |   11 ++++++++++-
>  2 files changed, 11 insertions(+), 2 deletions(-)

I'm no xsl expert, but

> -  <xsl:variable name="href_base" select="''"/>
> +  <xsl:variable name="href_base">
> +    <xsl:choose>
> +      <xsl:when test="$pagename = '404.html'">
> +        <xsl:value-of select="'/'"/>
> +      </xsl:when>
> +      <xsl:otherwise>
> +        <xsl:value-of select="''"/>
> +      </xsl:otherwise>
> +    </xsl:choose>
> +  </xsl:variable>

this reads pretty straightforward, so I'm okay giving:

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]