======Expanding on the GS3 Customisation tutorials====== This wiki explains how to introduce support for other Greenstone 3 features into the custom ''perrin'' interface created by following [[http://files.greenstone.org/tutorial/gs3-current/en/all_tutorials.html#new_interface1|the Greenstone 3 tutorial series on Designing a new interface]]. =====Displaying collection groups====== If you have edited ''web/sites//groupConfig.xml'' to set up collection groups, then you can add support for your collection groups into the ''perrin'' Greenstone3 interface by editing ''web/interfaces/perrin/transform/pages/home.xsl'' as follows: 1. Change:
to:
2. Before the terminating '''' add:

/group//

sites// 200px float:right

Collection group:

3. Save and close the file.\\ Any changes to ''groupConfig.xml'' would need a server restart to take effect. However, if you already restarted after editing ''groupConfig.xml'', then you only need to refresh your browser to see the changes to ''home.xsl'' above in action. ==== Advanced: if laying out groups column-wise in table cells of an html table ==== There is some complexity if you want every 2 groups (or collections) appearing in a separate ''
'' or other element. The following modifications to ''home.xsl'' will produce groups in a 2 rows by 3 column table, but laid out column-wise: the 1st column first, then 2nd column, then 3rd column, etc. These modifications also optionally provide support for an additional column of standalone collections. First follow the steps in the section Displaying Collection Groups above, then, edit ''web/interfaces/perrin/transform/pages/home.xsl'' as follows: 1. Locate: Replace with: 2. Locate: Replace with: 3. Locate: Replace with: 4. Before the ''customGroupDescription'' template, now insert the following: If yo were to set a ''class'' attribute on the '''' cells above, you could move the styling for the '''' cells into a css file where you can also add additional styling to them. =====Adding the Depositor link and Depositor pages====== 1. Edit ''web/interfaces/perrin/transform/transform/layouts/main.xsl'' by locating: ... Immediately after '''' in the above excerpt, add the following: 2. Then copy the folder ''web/interfaces/default/transform/depositor'' into ''web/interfaces/transform/perrin''. This is because this folder is referred to from your ''web/interfaces/perrin/interfaceConfig.xml'' file: 3. Save and close the file.\\ Refresh your browser and login to see the Depositor link. The Depositor wizard's interface for ''perrin'' could do with some CSS styling. But the above changes brings the Depositor's functionality into the ''perin'' interface. =====Displaying the document/section index level dropdown in the basic search form====== By default, the visible search box does not provide a dropdown to search at document vs section level, even if there is more than one search level index available for a collection. It just searches within the default level index, and users would need to choose one of the form search options to have control over this. With the following changes in place, if there is more than one search level index for a collection, a dropdown will be displayed near the default search box, allowing the user to choose at what index level to search. By default this dropdown would be set to the default search level index configured when the collection was built. Edit ''web/interfaces/perrin/transform/transform/layouts/main.xsl'' as follows: 1. Comment out the code that hides index levels by replacing with: 2. Find: Insert the following //before// that line: true true 3. Save and close the file.\\ Refresh your digital library page in your browser, visit a collection and look for the new dropdown in the basic search form area. =====Adding in links to available search forms===== Collections tend to have text, fielded and advanced search forms turned on by default. The perrin interface provides links to these in a dropdown in the navigation bar for the collection. If you wanted to display a horizontal line of links to these instead, then as follows: 1. Adjust ''web/interfaces/perrin/transform/transform/layouts/main.xsl'' as follows: Locate:
Replace the above with: 2. Change in web/interfaces/perrin/styles/gs3-core-min.css: .col2{color:#FFFFFF; background-color:#F6F6F6;height:67px;} By editing the 67px for height to 90px, so the same line now looks like: .col2{color:#FFFFFF; background-color:#F6F6F6;height:90px;} 3. Edit ''main/trunk/model-interfaces-dev/opotiki/styles/layout.css'' by locating: /* ----------------------------------------------Generalise------------------------------------- */ Add the following above that: div.query-form-links{float:right;} div.query-form-links a{font-size:16px;background-color:transparent;} div.query-form-links li{display:inline;padding-left:10px} div.query-form-links ul{padding-right:20px;} 4. Save and close the edited files.\\ Refresh your digital library page in your browser, visit a collection that supports multiple search forms and there should now be links under the default search form to the other search forms available.