en:user:gs2_customization
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | en:user:gs2_customization [2023/03/13 01:46] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | |||
+ | ====== Greenstone 2 Customization ====== | ||
+ | |||
+ | Here are some tips for how to do various Greenstone 2 customizations. | ||
+ | |||
+ | ===== Changing the library logo ===== | ||
+ | |||
+ | Put your new logo image into greenstone2/ | ||
+ | |||
+ | ===== Adding a new static page ===== | ||
+ | |||
+ | Adding a new static page to Greenstone is relatively simple and involves only customizations to macro files (found in greenstone2/ | ||
+ | |||
+ | ==== Add a new static page to the library ==== | ||
+ | |||
+ | |||
+ | ** 1. Create a macro file for the new page, in gsdl/ | ||
+ | |||
+ | A very basic content might look like this: | ||
+ | |||
+ | < | ||
+ | package history | ||
+ | |||
+ | _pagetitle_ {Library History} | ||
+ | |||
+ | _content_ { | ||
+ | < | ||
+ | Our library was created in June 2011, by an amazing team of volunteers... | ||
+ | Thanks for all your help. | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | The _pagetitle_ macro defines the title that appears in the browser window frame. The <h2> bit in content gives a header for the actual page. | ||
+ | |||
+ | The page will be styled like the rest of the library, and have the 'home help prefs' buttons along the top. | ||
+ | |||
+ | ** 2. Tell the library about the new page ** | ||
+ | |||
+ | Edit greenstone2/ | ||
+ | |||
+ | ** 3. Link to the new page from the home page** | ||
+ | |||
+ | Edit the _content_ macro in macros/ | ||
+ | |||
+ | <a href=" | ||
+ | |||
+ | ==== Add a new static page to a collection ==== | ||
+ | |||
+ | To add a page for just one collection, then we will do the modifications in the collection' | ||
+ | |||
+ | **1. Create the new page** | ||
+ | |||
+ | This is similar to above, but we can just add it into extra.dm instead of creating a new file. | ||
+ | |||
+ | < | ||
+ | package history | ||
+ | |||
+ | _pagetitle_ {Collection History} | ||
+ | |||
+ | _content_ { | ||
+ | < | ||
+ | This collection was created in June 2011, by an amazing team of volunteers... | ||
+ | Thanks for all your help. | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | The page will have the home/ | ||
+ | To add the navigation bar (containing search and classifier buttons), add | ||
+ | _optnavigationbar_ at the start of the _content_ macro (above the < | ||
+ | |||
+ | We don't need to tell the library about the macro file as extra.dm is always loaded automatically. | ||
+ | |||
+ | However, if you do want the new page to be in its own macro file, then put the file into the collection' | ||
+ | |||
+ | **2. Link to the new page** | ||
+ | |||
+ | Where do you want the new page linked from? If it is just a link from the about page, then add " | ||
+ | |||
+ | For example, it may look like this: | ||
+ | |||
+ | < | ||
+ | package about | ||
+ | |||
+ | _content_ { | ||
+ | _optnavigationbar_ | ||
+ | |||
+ | <div class=" | ||
+ | _If_(" | ||
+ | | ||
+ | ) | ||
+ | _If_(_Global: | ||
+ | _textsubcollections_ | ||
+ | |||
+ | <div class=" | ||
+ | < | ||
+ | _help: | ||
+ | </ | ||
+ | |||
+ | <a href=" | ||
+ | </ | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | Here I have added the link at the end of the page. | ||
+ | Note that the page name (history) in the URL (_httppagex_(history) ) must correspond to the package name in the macro file (package history). It has nothing to do with the actual filename. |
en/user/gs2_customization.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1