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

Last change on this file since 32502 was 28448, checked in by davidb, 11 years ago

Minor tweak to text description

  • Property svn:executable set to *
File size: 1.9 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/WEB-INF/web.xml:
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
40====
41
42To add a new page to this interface 'sparql.xsl' do the following:
43
441. Create a pages folder:
45
46 mkdir -p $GSDL3HOME/interfaces/and-sparql/transform/pages
47
482. Create a 'stub' page (that can be customized later on):
49
50 /bin/cp $GSDL3HOME/interfaces/default/transform/pages/about.xsl \
51 $GSDL3HOME/interfaces/and-sparql/transform/pages/sparql.xsl
52
533. Edit the interfaceConfig.xml file to include
54
55 emacs $GSDL3HOME/interfaces/and-sparql/interfaceConfig.xml
56
57 <?xml version="1.0" encoding="UTF-8"?>
58 <interfaceConfig baseInterface="default">
59 <actionList>
60 <action class="PageAction" name="p">
61 <subaction name="sparql" xslt="pages/sparql.xsl"/> <!-- **** -->
62
63 <subaction name="home" xslt="pages/home.xsl"/>
64 <subaction name="about" xslt="pages/about.xsl"/>
65 <!-- ... -->
66
67
68
694. Now edit 'sparql.xsl' to include the information you want your new page to have
70
71 emacs $GSDL3HOME/interfaces/and-sparql/transform/pages/sparql.xsl
72
Note: See TracBrowser for help on using the repository browser.