en:user:expanding_on_gs3_customisation_tutorials
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:user:expanding_on_gs3_customisation_tutorials [2020/09/03 21:49] – anupama | en:user:expanding_on_gs3_customisation_tutorials [2023/03/13 01:46] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | |||
+ | |||
======Expanding on the GS3 Customisation tutorials====== | ======Expanding on the GS3 Customisation tutorials====== | ||
This wiki explains how to introduce support for other Greenstone 3 features into the custom '' | This wiki explains how to introduce support for other Greenstone 3 features into the custom '' | ||
- | =====Adding support for collection groups====== | + | =====Displaying |
If you have edited '' | If you have edited '' | ||
Line 89: | Line 92: | ||
<!-- If the group has a description - display it --> | <!-- If the group has a description - display it --> | ||
< | < | ||
+ | <!-- for supporting html in group description, | ||
+ | is displayed in template name=' | ||
<p class=" | <p class=" | ||
</ | </ | ||
Line 100: | Line 105: | ||
</ | </ | ||
- | 3. Any changes to '' | + | 3. Save and close the file.\\ |
+ | Any changes to '' | ||
- | =====Adding | + | ==== 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 ''< | ||
+ | |||
+ | The following modifications to '' | ||
+ | |||
+ | These modifications also optionally provide | ||
+ | |||
+ | First follow | ||
+ | |||
+ | 1. Locate: | ||
+ | < | ||
+ | Replace with: | ||
+ | < | ||
+ | <!-- < | ||
+ | |||
+ | <!-- output the groups, the following outputs them column wise --> | ||
+ | < | ||
+ | <!-- then output the collectionList in a final column --> | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | 2. Locate: | ||
+ | < | ||
+ | Replace with: | ||
+ | < | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | 3. Locate: | ||
+ | < | ||
+ | Replace with: | ||
+ | < | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | 4. Before the '' | ||
+ | < | ||
+ | <!-- To organise table cells, <td>, one column at a time: | ||
+ | https:// | ||
+ | will not work, since we have an if-statement inside the for loop to filter for groups. | ||
+ | Instead, counting only the groups using Borodin' | ||
+ | https:// | ||
+ | |||
+ | While that gives us a proper counter not dependent on position(), it doesn' | ||
+ | that we need to open a tag (td) on odd count and close it on even. | ||
+ | For that, the solution is at: | ||
+ | https:// | ||
+ | |||
+ | General: https:// | ||
+ | --> | ||
+ | < | ||
+ | < | ||
+ | <xsl:if test=" | ||
+ | <td style=" | ||
+ | < | ||
+ | <!-- calls the template match=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <!-- We want collections to appear in a separate and single column. | ||
+ | So we don't do even odd columns here. --> | ||
+ | < | ||
+ | <td style=" | ||
+ | < | ||
+ | <!-- why does calling the template match=" | ||
+ | attr this time NOT work? --> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | If yo were to set a '' | ||
+ | |||
+ | |||
+ | =====Adding the Depositor link and Depositor | ||
1. Edit '' | 1. Edit '' | ||
< | < | ||
Line 136: | Line 226: | ||
</ | </ | ||
- | 3. Refresh your browser and login to see the Depositor link. The Depositor wizard' | + | 3. Save and close the file.\\ |
+ | Refresh your browser and login to see the Depositor link. The Depositor wizard' | ||
+ | =====Displaying the document/ | ||
+ | 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 '' | ||
+ | |||
+ | 1. Comment out the code that hides index levels by replacing | ||
+ | < | ||
+ | <input type=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | with: | ||
+ | < | ||
+ | <!-- don't hide indexing levels: code further down will hide it if there' | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | --> | ||
+ | |||
+ | 2. Find: | ||
+ | < | ||
+ | Insert the following //before// that line: | ||
+ | < | ||
+ | |||
+ | <!-- The index level selection list. hideSingle=true to hide the dropdown if there' | ||
+ | < | ||
+ | <span class=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | 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 '' | ||
+ | Locate: | ||
+ | < | ||
+ | <br class=" | ||
+ | <div id=" | ||
+ | </ | ||
+ | |||
+ | |||
+ | Replace the above with: | ||
+ | < | ||
+ | <!-- The list of other search types --> | ||
+ | <div class=" | ||
+ | <ul> | ||
+ | < | ||
+ | <xsl:if test="/ | ||
+ | <li class=" | ||
+ | <a class=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | </a> | ||
+ | </li> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | 2. Change in web/ | ||
+ | < | ||
+ | By editing the 67px for height to 90px, so the same line now looks like: | ||
+ | < | ||
+ | |||
+ | 3. Edit '' | ||
+ | < | ||
+ | Add the following above that: | ||
+ | < | ||
+ | div.query-form-links{float: | ||
+ | div.query-form-links a{font-size: | ||
+ | div.query-form-links li{display: | ||
+ | div.query-form-links ul{padding-right: | ||
+ | </ | ||
+ | 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. | ||
en/user/expanding_on_gs3_customisation_tutorials.1599169756.txt.gz · Last modified: 2020/09/03 21:49 by anupama