$site variable - Freedom Theme

Hello, this is with regards to Omeka-S 4.10rc and Freedom v1.01 … I am just starting to get into how themes work and how to use Saas to customize the Freedom theme. While working on a site I clicked the “Advanced Search” link from header.phtml and got a 404 with this URL: https://item/search

I added print statements to the top of that phtml file for $site->URL it prints out “/”

I am wondering if this is something to do with my Omeka-S & Apache2 setup. My Omeka-S installation is at mydomain.net and I am building sites that are at subdomain.mydomain.net along with the Domain Manager v2 to map the subdomains to Omeka-S sites.

Freedom constructs the link to the Advanced search page like this:
<a class="main-header__advanced-search" href="<?php echo $site->url() . '/item/search'; ?>">Advanced Search</a>

Another site that I have which uses Foundation v1.3.4 constructs its URL to Advanced search quite differently (and works): <?php echo $this->hyperlink($this->translate('Advanced search'), $this->url('site/resource', ['controller' => 'item', 'action' => 'search'], ['query' => $query], true), ['class' => 'advanced-search']); ?>

If the problem is my combination of subdomains and the Domain Manager module, I thought I would adapt the code from Foundation and that does work … so I have a fix for the moment but am curious if the issue is my setup or something with Freedom.

Thank you!

Hi, thanks for reporting this issue. It seems that as you said, applying the Foundation theme way would solve this issue, could you confirm please if it worked for you so I’ll add it to the base code for the next release?


Hello, thank you for the response. Yes, I replaced the Freedom advanced search with the below (I I did not take the time to sort out how to have the placement in the same spot as the Freedom theme, which I think lots a bit nicer). Can you also confirm, was this an issue with my site setup (the subdomain + Domain Manager approach)?

<?php echo $this->hyperlink($this->translate('Advanced search'), $this->url('site/resource', ['controller' => 'item', 'action' => 'search'], true), ['class' => 'main-header__advanced-search']); ?>

Also wanted to say I am enjoying using the Freedom theme!

Thanks for confirming it works on your side. Yes, the issue seems to be related to having a non-omeka-team module (the one that does subdomains).

I’ll work on this by implementing the same function used in Foundation while maintaining the Freedom style.

Thanks for using Freedom! I’m glad you’re enjoying using it.

Thank you very much for looking at a change that would support the Domain Manager module.

However, I am guessing that another – perhaps more sustainable and less likely to cause other problems – approach would be to implement a proxy server that converts requests for subdomain.mydomain.net into requests to mydomain.net/omeka/site. I have been looking at how a proxy server might fit into the overall infrastructure we are building so I will look into that as well.

Has this update been implemented?

I installed v4.1 and it appears to be working … have not tested extensively.