User Tools

Site Tools


en:beginner:customization
This version is outdated by a newer approved version.DiffThis version (2016/06/24 02:35) is a draft.
Approvals: 0/1
The Previously approved version (2016/05/23 00:08) is available.Diff

This is an old revision of the document!


Customization

Part of the Greenstone Beginner's Guide
Customizing the look of your Greenstone library and collections requires you to know how and where to make the changes that you want. This page provides some insight, telling you where to go if you want to make changes to the layout, the style, the display of your documents and lists, etc.

There are a few pages that, though not directly concerned with customization, can be very useful during the process:

  • The directory structure page can help you locate important files and folders in your installation.
  • Understanding how Greenstone URLs work, including CGI arguments, can help you create links to various pages in your collection.
  • Knowing the files that configure specific aspects of your installation is very important as you begin to customize.

<TABAREA tabs="Greenstone3,Greenstone2"> <TAB>

Site, interfaces, and libraries

Sites and interfaces contain the content and presentation information, respectively, for the digital library.

A site is comprised of a set of collections (and possibly some site-wide services). A site can be seen as a collection of collections. You can have multiple separate sites in a single Greenstone3 installation.

An interface is a set of images (and, potentially, CSS and Javascript) along with a set of XSLT files used for translating XML output from the library into an appropriate form – HTML generally. XSLT (and therefore every Greenstone interface) is built around things called templates, which will tell Greenstone how to display pages depending on the content for that page (e.g. a document's metadata, the names of the collections in your site, what browsing classifier have been defined, etc.).

If all of that sounds really confusing, don't worry! Unless you want to make extreme changes to an interface (or define your own), you can largely avoid XSLT.

While the interfaces (i.e. the files that dictate how each page looks) themselves are separate from the content, you can override any part of the interface on either the site or collection level. In fact, Greenstone3 provides some features to make modifying or overriding an interface easier:

  • Themes, are the easiest way to change how your library looks. The default Greenstone3 interface is built using JQuery themes, which allow you to change the color-scheme (as well as things like roundness of corners) effortlessly. While even advanced users will find themes useful, they are especially valuable for non-technical users, because they require absolutely no knowledge of CSS, HTML, or XSL
  • Format statements: In many cases, if you do not know XSL, you can instead use Greenstone's statement format (''gsf''), which Greenstone will translate (behind-the-scenes) into XSL. gsf syntax is XML-based. (If you don't know XML, don't worry; it looks and acts very similarly to HTML.)
  • The GLI's Format Features section: The GLI provides an easy way to override parts of interface on a collection-level. Instead of having to create your own XSL files, you can type templates into the Format Features section of the Format panel.

You can create any number of interfaces in your Greenstone3 installation, which is especially useful for when you want to present the same content in different ways. For example, you may want to provide two interfaces for your sites: one interface for visitors using computers and another interface for mobile users. In addition, multiple sites can make use of the same interface.

Finally, every site-interface combination you create is considered a library (in technical terms, each library is actually a servlet). </TAB> <TAB>

Collection level vs. library level

Customization can be done at either collection level or library level. Any changes made in the GLI will only effect the current collection (though, you can copy formatting into future collections by basing them on another collection). Other methods of customization can be enacted on a collection or library basis.

Format Statements

The content of a Greenstone collection is handled by format statements, which can be modified in the GLI (under Format → Format Features). So, if you want to change how documents appear in browsing pages, search results, and on individual document pages, format statements are where to make changes.

Macros

Greenstone2 is built on macros, which look like _this_ and basically stand for a block of text or code. </TAB> </TABAREA>

Now that you know the basics of using and customizing Greenstone, there are a few other features, functions, and resources you should be aware of. The final section of this Beginner's Guide presents additional Greenstone topics.

en/beginner/customization.1466735711.txt.gz · Last modified: 2016/06/24 02:35 by kjdon