[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] Question on 'Return to Top"
Thank you so much Bob, Your timely help is a boon to novices like me. Much appreciate it. Regards, Sarah -----Original Message----- From: Bob Stayton [mailto:bobs@sagehill.net] Sent: Friday, April 15, 2005 1:31 PM To: SIRIGINA Saraswathi; docbook-apps@lists.oasis-open.org Subject: Re: [docbook-apps] Question on 'Return to Top" There is no parameter to turn this feature on, but you can do it with a customization. If you are using <section> elements, then this customization will do it. I provided versions for both chunked and non-chunked HTML. Just uncomment the one you want to use and put it in your customization stylesheet. <!-- Use this version for <section> in chunked output --> <!-- <xsl:template name="section.titlepage.before.recto"> <xsl:variable name="level"> <xsl:call-template name="section.level"/> </xsl:variable> <xsl:variable name="chunkfn"> <xsl:apply-templates mode="chunk-filename" select="."/> </xsl:variable> <xsl:if test="$level > $chunk.section.depth"> <p class="returntotop"> <a href="{$chunkfn}"> <xsl:text>Return to top</xsl:text> </a> </p> </xsl:if> </xsl:template> --> <!-- Use this version for <section> in nonchunked output --> <!-- <xsl:template name="section.titlepage.before.recto"> <xsl:variable name="top-anchor"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="/*[1]"/> </xsl:call-template> </xsl:variable> <p class="returntotop"> <a href="#{$top-anchor}"> <xsl:text>Return to top</xsl:text> </a> </p> </xsl:template> --> They both make use of the placeholder template named 'section.titlepage.before.recto'. This template is called just before the template that generates a section title, so it will put the link to the top just before each section title. You can customize the look with CSS applied to the class="returntotop" selector. If you are using sect1, sect2, etc. instead of section, you will need to create customized templates for sect1.titlepage.before.recto, and the same for sect2, sect3, etc. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "SIRIGINA Saraswathi" <SSirigina@COVANSYS.COM> To: <docbook-apps@lists.oasis-open.org> Sent: Wednesday, April 13, 2005 6:04 AM Subject: [docbook-apps] Question on 'Return to Top" Hi, Is it possible to give a return to top link at several places in the generated HTML file that takes you back to the top of the page. If so, how do you do it. I did it with Link placed at the several places, but my anchor id could only be placed after the articleinfo section. Please advise. Thnx Sarah PS: is there something like a section separator with a back to top feature - please let me know Confidentiality Statement: This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by return email.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]