CustomizingGridView

Background
The Grid View is one of several views of the Browse and Results pages. By default the fields that show are (title, subject and description in addition to the thumbnail), but often a collection will have a unique metadata field that you want to display. This can be achieved by editing the browse.php and results.php files in the /cdm4/ directory. In each, near the top (10 lines down or so) of the file, you need to add two lines of code to instruct the system to allow unique "cases." You can have a case statement for each collection if you wish.

Browse/Results.php
--Add these two lines of code:--

--Above this line:--

--Then after this line (which is the end of the default parameters):--

--Add this code (which is a case statement for a particular collection):--

Field Nicknames
You can add more cases above the last closing bracket. But what you'll need to do is edit "define("DEF_CISOGRID", so that instead of title, subjec and descri, you insert the "nicknames" of the fields you want to display.

What are nicknames? Field nicknames are the names the system uses in reference to a collection's metadata fields. It is important to understand that this is not the Dublin Core mapping or the label you have assigned a field. To see what a collection's field nicknames are, go to the collection data folders, and for your collection go to index > etc > config.txt. You will see something like this:

The field nickname is the name right after the field name, not the one at the end (this is the DC mapping). You can see from this example that the field nickname for Subject is "subjec," which is not surprising, but the nickname for Coverage is "geogra" NOT "covera." Enter the field nickname you want to display in Grid View in the "case" for your collection (remember to use the actual collection alias where it says "alias." And make sure you are editing "DEF_CISOGRID." You can edit any of the views, but make sure you are not editing the Default case, since your unique field probalby only exists for that collection.

Please edit these directions if they are not clear. Especially to make the added code section better formatted. I'm not a Wiki Whiz, so my plain text is not the best.

Mark Anderson University of Iowa Libraries.