Jump to:

1347 Posts in 439 Topics by 514 members

Themes

SilverStripe Forums » Themes » "balance" theme not working

Discuss SilverStripe Themes.

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

Page: 1 2
Go to End
Author Topic: 3070 Views
  • mandrew
    Avatar
    Core Development Team
    32 Posts

    Re: "balance" theme not working Link to this post

    Could be a permissions problem on the file but not sure... might be a question to ask your hosting company to see if they can get rid of the file as I'm sure the file isn't part of the theme.

    Good to hear the theme is working now which is the main thing

  • affilimate
    Avatar
    Community Member
    9 Posts

    Re: "balance" theme not working Link to this post

    sure is working now! Thanks for the great support! I also just managed to install userforms after 3 hours of struggling but I'm getting there -Now I'm trying to get recaptcha to work with userforms - but let me try and figure it out...

    One thing you could help me with is to understand how I can get my homepage to have 3 content boxes that have individual html editors in the admin - just like the official demo site has on the balance theme. Is that some extra module or is there a setting in the admin to do that? That was the whole reason I fell in love in this theme.

  • affilimate
    Avatar
    Community Member
    9 Posts

    Re: "balance" theme not working Link to this post

    Can anyone please assist with my question above:
    how I can get my homepage to have 3 content boxes that have individual html editors in the admin - just like the official demo site has on the balance theme. Is that some extra module or is there a setting in the admin to do that? That was the whole reason I fell in love in this theme.

  • mandrew
    Avatar
    Core Development Team
    32 Posts

    Re: "balance" theme not working Link to this post

    You need to go into the code of the home page (HomePage.php), create it if it doesn't exist in mysite/code and then add three more database fields like so:

    static $db = array(
    'Content1' => 'HTMLText',
    'Content2' => 'HTMLText',
    'Content3' => 'HTMLText'
    );


    Then add the code for the fields into the CMS below (in the same file):

    function getCMSFields() {
    $fields = parent::getCMSFields();

    $fields->addFieldToTab("Root.Content.Main", new HtmlEditorField("Content1", "Content1 Title"));
    $fields->addFieldToTab("Root.Content.Main", new HtmlEditorField("Content2", "Content2 Title"));
    $fields->addFieldToTab("Root.Content.Main", new HtmlEditorField("Content3", "Content3 Title"));
       
    return $fields;
    }


    Then finally add the values in the template HomePage.ss (create the page is it doesn't exist... make a copy of Page.ss in themes/(theme)/templates/Layout, rename to HomePage.ss and then add the fields you created ($Content1 $Content2 $Content3).

    See http://doc.silverstripe.org/doku.php?id=tutorial:2-extending-a-basic-site for more info about creating new page templates.

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