en:user:gs3_sample_interface_modifications
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:user:gs3_sample_interface_modifications [2019/10/21 22:18] – [Changing the collection description] kjdon | en:user:gs3_sample_interface_modifications [2019/10/21 22:29] – [Changing the collection description] kjdon | ||
---|---|---|---|
Line 20: | Line 20: | ||
< | < | ||
- | Lets leave the collection description displayed as is, but also output "This collection contains X documents, and was last built on Y". | + | This template basically outputs |
We can redefine the template as: | We can redefine the template as: | ||
Line 44: | Line 44: | ||
If we want this text to be displayed in a language dependent manner, then we need to define it in the properties file, (and translate it in the appropriate language properties file), and retrieve it from there. | If we want this text to be displayed in a language dependent manner, then we need to define it in the properties file, (and translate it in the appropriate language properties file), and retrieve it from there. | ||
+ | The default interface has these two statements already defined (in web/ | ||
+ | < | ||
+ | about.standarddescriptiondays=This collection contains {0-numdocs} documents and was last built | ||
+ | {1-numdays} days ago. | ||
+ | about.standarddescriptiondate=This collection contains {0-numdocs} documents and was last built on | ||
+ | {1-date}. | ||
+ | </ | ||
+ | To call them, we need to define variables for the arguments, and then pass them in as a ; separated string. | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | / | ||
+ | < | ||
+ | < | ||
+ | ' | ||
+ | </ | ||
+ | |||
+ | If we wanted to use this technique, but want to define our own text just for the collection, we can add an interface_custom.propeties file into web/ | ||
+ | Define the property there, eg: | ||
+ | < | ||
+ | descriptionextra=This very awesome collection was last built {0-days} ago, | ||
+ | and contains {1-numdocs} manuscripts. | ||
+ | </ | ||
+ | |||
+ | Then we use a similar utility function call that will look for the key in the custom file instead of the standard file: | ||
+ | < | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | Note we have changed the order in which we use the arguments, so we need to change the order we pass them in. | ||
==== Total documents in library ==== | ==== Total documents in library ==== |
en/user/gs3_sample_interface_modifications.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1