I’m working on theming an Omeka-S install and I need to know if the current page is the homepage or not. What is the best way of doing this?
Currently I have the following because the only way (that I can see) to work out which is the homepage is if its the first item in the navigation!? but then I’m not able to find the current page slug, only the current site slug.
Uncaught Error: Call to a member function slug() on null in /var/www/html/
If there is no better way I’ll probably stick with the solutions above, but something more elegant would be appreciated, as I suppose that having some custom features on the homepage is not so unusual.
I have not been able to find relevant references in the documentation.
That’s a workable option… the issue you’re having with what I suggested is that it’s intended to go on the “page” view, omeka/site/page/show.phtml. That’s where the $page variable will be set (and also automatically sidesteps any issues of the markup getting applied on other things than user-created pages).