Prevent empty widget areas from being hidden

Moved Technical Support
  • #1

    Hi

    I would like to keep some widget area even if they are empty. How can I prevent NodeBB from adding the hidden class to them just after load?

    Thanks

  • #2

    Probably this line here.

    if (!renderedWidgets.length) {
    	area.addClass('hidden'); //Remove this.
    	ajaxify.widgets.reposition(location);
    }
    

    https://github.com/NodeBB/NodeBB/blob/master/public/src/widgets.js#L68

  • #3

    Thanks for that. I would expect some way to configure that. Removing that line would also apply that to all widgets areas, on all themes, right?

    My workaround is to add a plznohide class to the appropriate widget areas' divs and add this to either my theme CSS or the "Custom CSS":

    .hidden.plznohide {
        display: initial !important;
        visibility: visible !important;
    }
    

    It seems to work as expected. Being able to configure if each widget area should be hidden in the ACP would still be nice.


Suggested Topics


  • 0 Votes
    4 Posts
    168 Views

  • 0 Votes
    2 Posts
    871 Views

  • 0 Votes
    5 Posts
    4982 Views

  • 0 Votes
    1 Posts
    1463 Views

  • 3 Votes
    76 Posts
    33636 Views

| | | |