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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

Wildcard subdomain weird behaviour


Go to End


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