Adding breadcrumbs to a custom theme?

Hi

I am pretty new to php & omeka, but figuring it out as I go.
I am making a custom theme, but can’t seem to figure out how I can add breadcrumbs to my page.
(f.e. Home > Collections > MyCollection > Item)

Both

<?php echo $this->navigation()->breadcrumbs(); ?>

and

<?php echo $this->navigation()->breadcrumbs()->render(); ?>

did not work…

What is the correct way to add breadcrumbs in you omeka-pages?

Thanks!

1 Like

There is a function only for simple pages. For other pages, you have to build it yourself in the beginning of each page, for example for the items/show.php, with the appropriate css:

<ul id="simple-pages-breadcrumbs" class="breadcrumb">
    <li class="breadcrumb-link"<?php echo link_to_home_page(__('Home')); ?></li>
    <li class="breadcrumb-link"<?php echo link_to_collection_for_item(); ?></li>
    <li class="breadcrumb-link"<?php echo link_to_item(); ?></li>
</ul>

See https://omeka.readthedocs.io/en/latest/Reference/libraries/globals/ to get all the details of the functions to link_to something.

Thank you!
Will give this a go! :slight_smile: