GithubHelp home page GithubHelp logo

Comments (4)

oceanmountain avatar oceanmountain commented on July 22, 2024

Have you disabled widgets in the blogmodule? The blogmodule adds the widgetclass on its own (in case it is not available in your theme by default). So you might want to disable the widgets the Blog offers.

from silverstripe-widgets.

matt-bailey avatar matt-bailey commented on July 22, 2024

Hi @oceanmountain

I appears that you're correct, the widgets are being enabled by me (by extending the Page class as per the instructions in the README) and by the blog module. When I disable widgets in mysite/code/Page.php I get a single widget area on the Blog Holder in admin, but of course, there is now no longer a widget are on my standard pages.

Are you able to help me disable the widgets in the blog module, I'm not sure how to do that?

from silverstripe-widgets.

matt-bailey avatar matt-bailey commented on July 22, 2024

I've just done a bit of googling and came up with this 'solution'. In mysite/code/Page.php you only show the widgets tab in admin if the ClassName isn't BlogHolder.

I'm not sure it's the most elegant way of doing it though?...

public function getCMSFields() {
    $fields = parent::getCMSFields();
    if ($this->ClassName != 'BlogHolder') {
        $fields->addFieldToTab("Root.Widgets", new WidgetAreaEditor("WidgetArea"));
    }
    return $fields;
}

from silverstripe-widgets.

robbieaverill avatar robbieaverill commented on July 22, 2024

I can't reproduce this any more on SilverStripe 3.6.0, feel free to reopen if this is still affecting you

from silverstripe-widgets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.