Collapsed block options by default

Hi,

When a page contains various blocks, so much clutter makes the page harder to edit. Is there a way to tell the blocks to open with their options collapsed instead of expanded?

I see there’s a function in global.js

function(e) {
  e.preventDefault();
  var toggle = $(this);
  toggle.toggleClass('collapse').toggleClass('expand');
  if (toggle.hasClass('expand')) {
    toggle.attr('aria-label', Omeka.jsTranslate('Expand')).attr('title', Omeka.jsTranslate('Expand'));
    toggle.trigger('o:collapsed');
  } else {
    toggle.attr('aria-label', Omeka.jsTranslate('Collapse')).attr('title', Omeka.jsTranslate('Collapse'));
    toggle.trigger('o:expanded');
  }
}

But I don’t know how to use it.

Thanks!

It was easier to solve than I thought.

In the BlockLayout public function form function of the block I have built that occupies a lot of screen space…

$html .= '<a href="#" class="expand" aria-label="Expand">'

Cheers.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.