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.

All other Modules /

Discuss all other Modules here.

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

Subsite Module, Sub Themes, and Userforms Module?


Go to End


2 Posts   956 Views

Avatar
ocean

Community Member, 37 Posts

23 May 2012 at 9:49pm

Hopefully what is going wrong in this setup will be obvious to someone here, I'd certainly appreciate the help!

The Issue:

I have a group of websites with similar styling, right now on three domains, two of them are subdomains, so I employed the subsites module for the first time, very nice and convenient. I also decided on the quest for ultimate coding elegance to employ sub themes for the first time, it worked like a charm, cascading theme changes to each sub theme only where specified, well nearly!

Later I discovered that the error pages and the UserDefinedForm pages are rendering in the wrong theme, ie, not picking up the sub theme styling of each site, deriving instead directly from the main theme, for some reason I cannot fathom this one out.

Here is The Setup:

Page.ss / theme / domain one
TwoPage.ss / theme_twopage / domain two
ThreePage.ss / theme_threepage / domain three

Somehow I have to get the error pages and userforms of domain two and domain three to point into their proper sub themes, like all the other pages in those sites currently do. Any ideas?

Many thanks
~ Sean

Avatar
ocean

Community Member, 37 Posts

26 May 2012 at 1:45am

Maybe there is a more elegant solution but the work around ended up being pretty straight forward;

- extended ErrorPage & UserDefinedForm with PageTwoErrorPage & PageTwoUserDefinedForm
- then put a css include for the subtheme styling in the controllers
- updated relevant pages in the subsites CMS to point to those new page classes

And all is well with the world, ( for now : )

Warm wishes
~ Sean