source: main/trunk/greenstone3/web/interfaces/default/transform/layouts/main.xsl

Last change on this file was 37680, checked in by davidb, 13 months ago

Introduction of some additional 'hook-points' xsl:templates that a GS interface can override

File size: 4.6 KB
RevLine 
[26459]1<?xml version="1.0" encoding="UTF-8"?>
[35815]2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil" xmlns:gslib="http://www.greenstone.org/skinning" xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:result="http://www.example.com/results" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="java util result exsl" exclude-result-prefixes="util java util gsf gslib">
[23336]3
[35815]4 <xsl:import href="header.xsl" />
5 <xsl:param name="lang" />
6 <xsl:include href="formatmanager.xsl" />
[22516]7
[35815]8 <!-- the output format for this layout is html -->
9 <xsl:output method="html" omit-xml-declaration="yes" />
[19856]10
[35815]11 <xsl:template match="/">
12 <xsl:call-template name="mainTemplate" />
13 </xsl:template>
[19988]14
[35815]15 <!-- the main layout is defined here -->
16 <xsl:template name="mainTemplate">
[19856]17
[35815]18 <html lang="{$lang}">
[19856]19
[35815]20 <head>
21 <!-- ***** in header.xsl ***** -->
22 <xsl:call-template name="create-html-header" />
[36075]23
[35815]24 </head>
[36075]25
[35815]26 <body>
[36075]27 <xsl:call-template name="textDirectionAttribute" />
[35815]28 <xsl:call-template name="actionClass" />
29 <!-- Consider bringing this template call back, but wrapped up in an "if debug" ?? -->
30 <!--<xsl:call-template name="displayErrorsIfAny"/>-->
31 <a name="top">
[35827]32 <xsl:text> </xsl:text>
[35815]33 </a>
[37680]34
35 <!-- ***** in header.xsl ***** -->
36 <xsl:call-template name="top-area"/>
37
[35815]38 <div id="container" class="ui-corner-all">
[34579]39
[35815]40 <!-- ***** in header.xsl ***** -->
41 <xsl:call-template name="create-banner" />
[34579]42
[35815]43 <xsl:if test="/page/pageRequest/paramList/param[(@name='formatedit') and (@value='on')]">
44 <xsl:call-template name="formatmanagerpre" />
45 </xsl:if>
46
47 <!--
48 IMPORTANT: when copying this file to base your own custom interface's main.xsl on this one,
49 or when writing a main.xsl for your custom interface from scratch,
50 it is absolutely crucial to ensure the div element containing the xsl:apply-templates for /page
51 is given the id="gs_content".
52 Without this, many parts of GS3 will fail as they make use of gs_content whenever they make
53 calls to the GS server that include 'excerptid=gs_content' in the URL params.
54 For instance, connecting a client-GLI to a remote GS3 server and attempting to view
55 collections will fail as the user groups for a user will return null without this.
56 ADDITIONAL NOTE: it has not been investigated whether adding addition html elements inside the
57 div with id="gs_content" is wise. I've not checked whether such elements will be parsed out
58 properly and just the expected portions retrieved successfully by callers that requested
59 excerptid=gs_content.
60 -->
61 <div id="gs_content" class="ui-widget-content">
62 <!--
63 Show the content of the page.
64 to customise this part, edit the xsl file for the page you want to edit
65 -->
66 <xsl:apply-templates select="/page" />
67
68 </div>
69
70 <xsl:call-template name="gs_footer" />
71 </div>
72 </body>
73 </html>
74 </xsl:template>
75
76 <!-- default is to have nothing inthea rightSidebar -->
77 <xsl:template name="floatRightSidebar">
78 <div id="float-anchor" style="width: 30%; min-width:180px; float:right; margin: 0 0 10px 20px;">
79 <xsl:call-template name="rightSidebar" />
80 </div>
81 </xsl:template>
82
83 <!-- Default rule is to be empty => no rightSidebar to show -->
84 <!-- Gets overridden in pages such as query.xsl and classifier.xsl to display baskets and facet info elements -->
85 <xsl:template name="rightSidebar"></xsl:template>
86
87 <!-- Template controlling the footer. -->
88 <xsl:template name="gs_footer">
89 <div id="gs_footer" class="ui-widget-header ui-corner-bottom">
90 <a href="https://www.greenstone.org">
91 <gslib:poweredByGS3TextBar />
92 </a>
93 </div>
94 </xsl:template>
95
[26871]96</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.