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

Last change on this file since 37403 was 37403, checked in by anupama, 14 months ago

add in the test for favourites/docbasket into create-html-header - that way, any custom files will come after. otherwise can't customise favourites in core-extra or additionalHeaderContent

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