Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS

Wildcard subdomain weird behaviour


Reply

299 Views

Avatar
Leon223

25 July 2012 at 1:49am (Last edited: 25 July 2012 1:49am), Community Member, 10 Posts

I currently building my first silverstripe website, it is powerfull and great tool!

But i am currently stuck on the following problem:

I have set my DNS to *.domain.com so every subdomain will go to the main website. When i navigate to domain.com without subdomain everything is showing up perfectly. I am using the following code:

<div class='columns'>
    <% control Children %>    
        <% if ClassName = BlokWrapper %>
               <% control Children %>
//continue
               <% end_control %>
        <% end_if %>   
    <% end_control %>
</div>

In this case the children of 'BlokWrapper' are showing up. This is the way i want it to behave. When i navigate from subdomain.domain.com to the website. Nothing is showing up. When i debug the code every child is showing up under the first <% control Children %>    

Is this a bug or a feature and how can i solve this? ;-)