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

Last change on this file since 35150 was 35150, checked in by davidb, 3 years ago

Powered-by footer changed to be https; added in comment marking out the idea to bring back displayErrorsIfAny, but only when in 'debug' mode

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