source: main/trunk/greenstone3/web/interfaces/ADD-AN-INTERFACE.txt@ 37900

Last change on this file since 37900 was 37900, checked in by davidb, 9 months ago

Updated instructions

  • Property svn:executable set to *
File size: 2.2 KB
Line 
1
2
3For a new interface based on the 'default' interface:
4
5 $GSDL3HOME/sites/and-sparql
6
7Do the following:
8
91. Create a top-level directory in the 'interfaces' folder:
10
11 mkdir $GSDL3HOME/interfaces/and-sparql
12
132. Add in a suitable interfaceConfig.xml file:
14
15 /bin/cp $GSDL3HOME/interfaces/default/interfaceConfig.xml $GSDL3HOME/interfaces/and-sparql/.
16
173. Edit it to include a 'baseInterface' attribute in the root element:
18
19 emacs $GSDL3HOME/interfaces/and-sparql/interfaceConfig.xml
20
21
22 <interfaceConfig> => <interfaceConfig baseInterface="default">
23
24 leave the rest of the file alone
25
26
274. Finally, edit a <servlet>...</servlet> block in:
28
29 $GSDL3HOME/resources/web/servlets.xml.in
30
31 to use your new interface name as the 'interface_name' parameter:
32
33
34 <init-param>
35 <param-name>interface_name</param-name>
36 <param-value>and-sparql</param-value>
37 </init-param>
38
39
405. [Optional] If your new interface is making use of JQuery-UI Theme
41 Roller, then you likely want to also edit:
42
43 $GSDL3HOME/interfaces/and-sparql/interfaceConfig.xml
44
45 and change the following line to specify your new interface name:
46
47 <option name="cssTheme" value="interfaces/and-sparql/style/themes/main/jquery-ui.theme.css"/>
48
49====
50
51To add a new page to this interface 'sparql.xsl' do the following:
52
531. Create a pages folder:
54
55 mkdir -p $GSDL3HOME/interfaces/and-sparql/transform/pages
56
572. Create a 'stub' page (that can be customized later on):
58
59 /bin/cp $GSDL3HOME/interfaces/default/transform/pages/about.xsl \
60 $GSDL3HOME/interfaces/and-sparql/transform/pages/sparql.xsl
61
623. Edit the interfaceConfig.xml file to include
63
64 emacs $GSDL3HOME/interfaces/and-sparql/interfaceConfig.xml
65
66 <?xml version="1.0" encoding="UTF-8"?>
67 <interfaceConfig baseInterface="default">
68 <actionList>
69 <action class="PageAction" name="p">
70 <subaction name="sparql" xslt="pages/sparql.xsl"/> <!-- **** -->
71
72 <subaction name="home" xslt="pages/home.xsl"/>
73 <subaction name="about" xslt="pages/about.xsl"/>
74 <!-- ... -->
75
76
77
784. Now edit 'sparql.xsl' to include the information you want your new page to have
79
80 emacs $GSDL3HOME/interfaces/and-sparql/transform/pages/sparql.xsl
81
Note: See TracBrowser for help on using the repository browser.