User Tools

Site Tools


en:user_advanced:gs3_custom_doc_display

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:user_advanced:gs3_custom_doc_display [2021/05/23 23:24] kjdonen:user_advanced:gs3_custom_doc_display [2023/03/13 01:46] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +
 +
 +
 ====== Customisations to Document Display in Greenstone 3 ====== ====== Customisations to Document Display in Greenstone 3 ======
  
-==== Image Slider ====+==== Customizing the Image Slider ====
  
 To customize the image slider. Look at the web/interfaces/default/js/document_scripts.js To customize the image slider. Look at the web/interfaces/default/js/document_scripts.js
Line 13: Line 16:
   <script type="text/javascript" src="sites/{$site_name}/collect/niupepa/js/custom-document.js"><xsl:text> </xsl:text></script>   <script type="text/javascript" src="sites/{$site_name}/collect/niupepa/js/custom-document.js"><xsl:text> </xsl:text></script>
 </xsl:template> </xsl:template>
- 
 </code> </code>
  
Line 19: Line 21:
  
 Note, you can do this for a site, or for a different interface. Just put the document.xsl and custom-document.js into the appropriate folders for site/interface, and modify the paths accordingly.  Note, you can do this for a site, or for a different interface. Just put the document.xsl and custom-document.js into the appropriate folders for site/interface, and modify the paths accordingly. 
- 
-</code> 
  
  
-Image Slider has a filtering option where you can view just part of the pages. You can choose whether to provide filtering options on the section num or the title using+Image Slider has a filtering option where you can view just part of the pages. You can choose whether to provide filtering options on the section num or the title by adding the following to custom-document.js:
 <code>_filter_on_types = ["sectiontitle", "sectionnum"];</code> <code>_filter_on_types = ["sectiontitle", "sectionnum"];</code>
  
Line 32: Line 32:
  
 Then titles will be filtered numerically rather than alphabetically. ie 1 will just display page 1 rather than 1, 10, 11 etc. Then titles will be filtered numerically rather than alphabetically. ie 1 will just display page 1 rather than 1, 10, 11 etc.
 +If you only want one filtering method, and you don't want to display the radio button, you can add
 +<code>var _display_single_filter_on = false;</code> (gs3.11 nightly from 25.5.2021). This will hide the radio button.
  
 The default display for each page in the slider is the section number followed by the title. To hide the section number you need to add the following to style/style.css in the collection The default display for each page in the slider is the section number followed by the title. To hide the section number you need to add the following to style/style.css in the collection
Line 51: Line 53:
  
 See web/interfaces/default/transform/layouts/header.xsl for more details about additionalHeaderContent templates. See web/interfaces/default/transform/layouts/header.xsl for more details about additionalHeaderContent templates.
- 
- 
  
en/user_advanced/gs3_custom_doc_display.1621812271.txt.gz · Last modified: 2021/05/23 23:24 by kjdon