Jump to:

10990 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » Subsite Module, Sub Themes, and Userforms Module?

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 518 Views
  • ocean
    Community Member
    37 Posts

    Subsite Module, Sub Themes, and Userforms Module? Link to this post

    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

  • ocean
    Community Member
    37 Posts

    Re: Subsite Module, Sub Themes, and Userforms Module? Link to this post

    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

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.