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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Wildcard subdomain weird behaviour


Go to End


703 Views

Avatar
Leon223

Community Member, 10 Posts

25 July 2012 at 1:49am

Edited: 25/07/2012 1:49am

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? ;-)