Jump to:

5540 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » allow user to customize page theme

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

Page: 1 2 3
Go to End
Author Topic: 4358 Views
  • mccarville
    Avatar
    Community Member
    32 Posts

    Re: allow user to customize page theme Link to this post

    I was just working with the code above and I found a little bit of a glitch... It seems the CMS does not like it when $ThemeX does not exist... meaning you would have to build the dropdown, log into the CMS, choose a theme and publish each page that exsists on your site, so that $ThemeX will have a value, before implementing the code in the page controller... otherwise it will return an error (The Red Box 'o Death)

    So I came up with a real easy fix to this problem, a quick update to the code in the page controller...

    .....

    if($this->ThemeX){
    SSViewer:set_Theme($this->ThemeX)
    }

    ....

    With the added if statement our pages will use the default theme set in our _config.php file if no value has been passed to ThemeX

    Enjoy!... Hope to add a tutorial to recipes soon...

  • MikeOne
    Avatar
    Community Member
    40 Posts

    Re: allow user to customize page theme Link to this post

    I know this is a fairly old thread but this is exactly what I was looking for and just wanted to warn others wanting to implement this..

    Please note - the last remark made has 2 typos:

    if($this->ThemeX){
    SSViewer:set_Theme($this->ThemeX)
    }

    Should be:

    if($this->ThemeX){
    SSViewer::set_theme($this->ThemeX)
    }

    (so should be :: and 'set_theme' lower case).

  • MikeOne
    Avatar
    Community Member
    40 Posts

    Re: allow user to customize page theme Link to this post

    And another quickie - how would I go about having the switcher in the CMS be the same for all pages?

    What I basically need is that ALL pages (of page type Page) have the same theme. I have no problem if the switcher is available on all pages - as long as it takes on the value set in the DB - and if changed and you would go to edit another page - it would have set there as well.

    In short - I will need this to behave as a 'global' theme switcher in the CMS. Any ideas how to do this?

    Thanks,
    Mike.

  • Marlie511
    Avatar
    Community Member
    36 Posts

    Re: allow user to customize page theme Link to this post

    2 Questions:

    1. I got this working on my main site where I could switch themes from page to page. I have the Subsites up and running and I cannot get it to work on these pages. Does anybody know what I need to do under the subsites to get it working? I want the users of subsites to be able to select their theme so I would not have to manage this.

    2. On my main site when I publish it after selecting the theme from the drop menu, the publishing button keeps processing even though it made the change. It is stuck, even though it worked. A little deceptive. Does anybody know how I can fix this?

  • Ematty
    Avatar
    Community Member
    2 Posts

    Re: allow user to customize page theme Link to this post

    By contrast, LARPs tend to be rooted in a single location. It's just part of the method(to Buy WOW Gold). Thirty or more characters come together to interact, plot and do whatever those characters do. Again, if the player base is much smaller, you're really running a series of tabletops. While I'm not saying it's impossible to have (WOW Gold)adventure in LARP, that genre of story just isn't built into the format. As such, I question whether a WOW(RuneScape Gold) LARP would have the same feel as the tabletop or video games. It would take a skilled game master to make the LARP feel adventurous.

    4358 Views
Page: 1 2 3
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.