View more context



Allright 😞 well I should be able to solve it using a custom controller, working on another task atm, but I will get back to this soon and see 🙂

Anish Joshi

Is there an if statement for looping children if only more than 3 children?

  1. <% if $Children.Count > 3 %>
  2. <% loop $Children %>
  3. <% end_loop %>
  4. <% end_if %>

Hey I've got this issue where despite loading a site via https, and setting base and alternate url to https protocol, it continues to be served via http which leads to resources not loading. Anyone have experience with this?


It's on AWS but sits in a container behind Ambassador which deals with the TLS bits. The site itself is being served by NGINX listening on port 80 as is what Ambassador passes it after receiving the connection on 443.


SilverStripe\Control\Director::baseURl() is getting nothing when it's attempting to retrieve alternate_base_url, the BASE_URL is nothing which leads to just a forward slash / being returned. I can see methods from the Director class get called multiple times, like absoluteBaseURL, absoluteURL, protocol, is_https etc, and in the life cycle of a single page load, it does eventually start printing https as the protocol, but initially isn't finding nothing for base or alternate url. I thought to set the yml file alternate_base_url is set in to run before framework though that hasn't changed anything


If anyone comes across this, I overcame it by setting the alternate base url in mysite.yml but crucially processing it before framework.