Exclude Site from List of Sites

I’m using the List of Sites block to create a page for browsing all sites. However, I’m achieving this desired functionality by having a dedicated site for the browsing. Naturally, I don’t want to have the site listing site in the list of sites. I have hacked at the problem for a while, but can’t manage to exclude the site listing site from the listed sites and exclude it appropriately from the pagination navigation. That is, I can exclude it from $sites that then gets iterated over to display the sites and I can decrement the navigation ceiling, but then I get a page with one fewer site than it should have, where “should have” means the navigation asserts the visitor is seeing sites 1–3 but only 1–2 are displayed.

I started down the road of essentially recreating the Site/BlockLayout/ListOfSites functionality, but can’t figure out how to paginate the API results and realized I needed to come here to see whether there’s not a simpler/better way to do it.

To foreclose one possible response, the instance is hosted in such a way that I cannot write a custom module for this. Alas.

If you’re not anticipating having enough sites to span multiple pages, just turning off the pagination setting for that block is an option.

We’ve noticed this problem with the List of Sites block also and have a fix lined up for the next Omeka S release. Your post makes me realize I need to go back and alter that fix though: the current fix works the simple way you’re describing here, meaning it currently causes the same problems with pagination.

1 Like

Unfortunately for the moment, we have multiple pages of sites.* I’ll look forward to the update! :smiley:

* Technically, we could have one page that shows 35+ sites — an interesting idea, but seems like not great UX.

You could check the module Block Plus (a module that allows to have multiple templates for each block), where there is an option for that.

I would if our host would consider non-canonical modules. :slight_smile:

You can push it on omeka.org, it’s open source.

Noted, thank you.

Also, sources inform me that our host in fact does allow us to upload non-canonical modules, so this may in fact be possible in two different ways.