Hello. I need assistance in formatting the display of information in the âBrowse Itemsâ category of our public page. We have formatted the browse.php file of our theme to display more information about each item, such as its creator and its unique identifier. However, the new information we are trying to share is being displayed inline with the description of the item. We were hoping to have each element on a different line, such as this:
Title
Creator
Description
Identifier
I have been unable to find where I need to modify this. I have attempted to modify both the browse.php file and the style.css file of our theme, but neither have produced any results. Could anyone direct me to the correct place I need to modify, and also the proper code I need to implement to get the desired results? Thanks in advance.
We are using the Berlin theme on a Omeka 2.2.2 installation.
I am also trying to change the elements that appear on the Browse Items pages. I thought it was a matter of editing the browse.php file. I tried editing that file in the items directory under the themeâs but it didnât work. The elements that appear currently are Title, Creator, and Date. I want to change those to Subject, Spatial Coverage, and Date, and maybe a couple more. (Iâm mapping headings to those DC elements.) Thanks.
Can you explain how you managed to make these changes? I also want to have the âBrowe Itemsâ listed by Subject as well as Title. What bits of the browse.php file do you have to change, and how?
The file youâre looking for is items/browse.php in your theme (if it doesnât exist in your theme, copy it over from application/views/scripts/items/browse.php first).
You should see calls to the function metadata() in the file that refer to Title and Description, you can supplement these or replace them outright with other elements.
Other records are the same process with a different folder: collections instead of items, and so on.
I tried this method, but somehow all I get is an error message⌠It would seem logical that it works and creates a list that has these pieces of info, and yet, it does not. Does it work for anyone? Is there any workaround solution to present at least two metadata info lines per item on the browse page?
Thanks, Daniele, I did not know this option, lifesaver I wonder if thereâs any way to list several ItemTypes based on certain conditions (one collection needs one ItemType, another nedds a completely different - so I need to âifâ all the variants somehow). Is there any good way to do this?
You can check the item type of each item: metadata('item', 'item_type_name') will return whatever type the current item is using. You could use this in an if or switch to do different things for each different type.