Content blocks with scrollbars

Permalink
Does anyone know how to add a content block that scrolls?

rrosskopf
 
hutman replied on at Permalink Best Answer Reply
hutman
You would probably have to do this by adding a Custom Template and adjust the CSS on the containing div to have scrolling.
rrosskopf replied on at Permalink Reply
rrosskopf
I wrote the code and tested it; now all I need to do is figure out how to make a custom template.

Thanks
hutman replied on at Permalink Reply
hutman
All you need to do is to copy the view.php from the /concrete/blocks/content folder out to the /application/blocks/content/templates/template_name.php here is a link to more information -http://documentation.concrete5.org/developers/working-with-blocks/w... if you don't want to put your custom CSS into the view.php file you can instead make the custom template like /application/blocks/content/templates/template_name/view.php and also put a view.css in that directory and it will load with the block on the page.
Gondwana replied on at Permalink Reply
Gondwana
I'm tinkering with this at the moment. The key CSS is 'overflow:auto' or appropriate variants of that. Obviously you'll also need to specify the size of the relevant containers (probably DIVs). I'm using it in conjunction with "position:fixed" to get sidebar menus that don't scroll away when the main content is scrolled. It's basically working, but getting it to play nicely with built-in styles and templates will be a challenge.