Re: [Hypercontent-users] Text Only Template
Brought to you by:
alexvigdor
From: Carl B. <C.P...@hu...> - 2004-10-12 10:30:40
|
Adam I have been somewhat distracted from setting hypercontent up due to other work here. However it is now as pressing as ever. I just have a couple of things to clear up.... You sent the code that you used for a link to a printable page which I have set up and it works for my text only site, my code below: <a class="topmenu" href="{concat($baseURL,'/campus/text_only',$sourceDirectory,$sourceBaseName, '.html')}">Text Only</a> This works on the live site (http://port.hull.ac.uk/campus) but won't work on my test/preview site, ( http://berk.lib.hull.ac.uk/uPortal/hulluni/build ). baseURL is passed fine but it's the path after that I can't get fully working, I have to hardcode the path after $baseURL in the link, so it's ether working on one site or the other. Have you come across this at all and do you have any idea how I might pass that path instead of coding it? All help appreciated Thanks Carl Adam Carl wrote: > Carl, > > Many times I produce a 'printable' version of a page as well as the > web version. This page is created for all pages > but I give the user the ability to hide the link to the printable > page. I create a variable in my page dtd and check for yes in my xsl. > > Here is some sample code: > > <xsl:variable name="sourceDirectory" > select="/cms:wrapper/cms:source/@directory" /> > <xsl:variable name="sourceBaseName" > select="/cms:wrapper/cms:source/@basename" /> > > <xsl:if > test="/cms:wrapper/cms:source/page/@include-printable-page-link ='yes'"> > > <div id="divPrintablePageLink"> > <a target="_blank" class="PrintablePageLink" > href="{concat($baseURL,'/printable',$sourceDirectory,$sourceBaseName, > '.html')}">View Printable Version</a> > </div> > > </xsl:if> > > This assumes you pass in the base URL into the stylesheet as a parameter. > > <xsl:param name="baseURL" /> > > Hope this helps. > > Adam > > -- ************************************ Carl Barrow Web Developer e-Services The University of Hull Cottingham Road Hull HU6 7RX Ext. 6838 ************************************ |