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:
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.
If you have a public link to the browse page, that’d be the most helpful thing.
Usually, though, this is pretty simple in CSS, just a matter of setting
display: block on the element(s) in question.
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.
I figured out where to make the change.
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?
Did you manage to show more Information? I also would like to show the title and creator on the browse item /collection etc pages?
would be Great if you can share 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.
Hi thanks for answering!
I am not very familiyar with css, so i try my best to muddle through…
Would the change be here:
<?php echo link_to_item(metadata('item', array('Dublin Core', 'Title')), array('class' => 'permalink')); ?>
<?php echo link_to_item(metadata('item', array('Dublin Core', 'Creator', 'Title' )), array('class' => 'permalink')); ?>
and then copy it to theme/items
should I also save the change in the Application/view/scripts/item/browse.php file?
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?
What’s the error message?
Unrecognized metadata specifier.
(I can copy and paste the entire stack trace if it gives more clue, of course. Thanks for any ideas in advance)
Karola, I doubt that array would work.
You should have instead two different lines, each one with its own element: one with
echo link_to_item(metadata('item', array('Dublin Core', 'Creator')), array('class' => 'permalink'));
and one with
echo link_to_item(metadata('item', array('Dublin Core', 'Title')), array('class' => 'permalink'));
That might solve also @dragonweb 's issue.
Thank you, Daniele, will try it today. Also: is there a way to include some Item Type as well, or is it DC-only solution?
I think the thread Combine several item type metadata might help you
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
switch to do different things for each different type.
This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.