How do I modify search results page

Please see this search results page.

We’d like to add at the very least ‘creator’ to the results view.



Sorry about that!
Realized that that is blocked.

Here is a screenshot:

You’ll need to override the default template for search/index.php in your theme (looks like Berlin or a derivative).

In that file, you’ll just need to modify the table to show the metadata you want, getting the metadata out of the $record variable, usually with the metadata function.

You might need to be careful, though, in checking whether the metadata exists. Since the search results can include many different record types, Dublin Core metadata might or might not be there, and at worst you might get an error. It’ll all depend on how your search is set up and what record types you get back.

Thanks, Patrick. I am just trying to get creator to show.

I added this and many derivatives of, but no luck:

<?php echo $searchText['creator'] ? $searchText['creator'] : '[Unknown]'; ?>

Can you give me a bit more of a hint?


The creator information isn’t set on the $searchText information. You’ll have to get it from the $record

The record is looked up in this line

<?php $record = get_record_by_id($searchText['record_type'], $searchText['record_id']); ?>

So anywhere after that you can look up that metadata with

$creator = metadata($record, array('Dublin Core', 'Creator'));

and do whatever checks you need to echo with where you want..

Super helpful!

It seems like we are forking the core,
since this index.php file resides in:

rather than the the theme.
I guess I will need to bring this change into any upgrade, if we decide or need to upgrade?

Ah, yes. The same changes would apply to modifying the public theme, but if you want them on the admin side, too, that’d be modifying the core.

Thanks, but I do not see a:
in Berlin.

So how?
And the change definitely changed the public view. I am not logged in and see my changes.

Ah. Sorry. I misread the path in your previous post.

Too make the changes only on the public side, you just need to follow the pattern described here to override the default theme.

That’ll be something to keep track of in the theme you use, but not in the core.

The change to this file:
changed the public side

and there does not seem to be an equivalent file in the theme.

So I continue to be confused.

You copy that file into the corresponding location in the theme you are using. You’ll probably need to create the search folder` in it. Then, make your changes in that newly created file.

But, why? It works on the public side without performing this step.
Or are you saying, if I do this, I remove the changes from the core, I do not have to worry about forking?

Yes, doing it that way removes the changes from core, and puts them into your theme.

Of course, since Berlin also ships with new Omeka, you will have to keep track of your changes when you update Omeka. But it should be easier to keep track of there than in the core.

So, should the file be located in which directory:


thank you!

Hi @patrickmj,
Is there a way I can increase the total item showing on the search page?
I want all the search content to be displayed without pagination. Is it possible?
Thanks, Darp

Quickest way at that is to change the settings for records per page under Appearance->Settings.

That will affect all pages, though, so if you want it to be more targeted we’d be looking at some kind of code change.