Overlay Size for Custom Block

Permalink
Hi

just a short question:

Where do a chnge the size the overlay of a block. I tried the "BlockTypes" in the DB but it didn't change anything.

Thanks a lot.

Philipp

 
LucasAnderson replied on at Permalink Reply
LucasAnderson
in controller.php...

protected $btInterfaceWidth = "400";
protected $btInterfaceHeight = "300";
phaselbo replied on at Permalink Reply
Hi

I played around w that but it seems
that the controller.php is just meant for
the block installation.

I want to change the size of an exisitng block.
When I edit the entry in the DB is has also no effect, where else can I try?

THX

Philipp
jordanlev replied on at Permalink Reply
jordanlev
You'll have to override the controller for the block(s) in question. Copy the "controller.php" file out of concrete/blocks/BLOCKNAME into a new folder in blocks/BLOCKNAME (note that you're copying it out of the "concrete" folder into just plain "blocks" in your site's root directory). Then edit the new controller.php file you just copied and change those fields that LucasAnderson points out. Now the tricky part is you need to refresh the block from the dashboard before the change will take effect -- go to Dashboard -> Add Functionality, find the block in question, click the "Edit" button next to it, and click the "Refresh" button there.
That should do the trick.

-Jordan
phaselbo replied on at Permalink Reply
Hi

THX a lot!
That works BUT the problem is now
that the content block is not listed
anymore in the "Add Functionality"
section.

Cheers

Philipp
jordanlev replied on at Permalink Reply
jordanlev
Hmm... sorry about that. Didn't realize that overriding the controller would do that. You may have to un-override it (delete blocks/content/controller.php), and instead change those values in the original controller (concrete/blocks/content/controller.php), then refresh it. But this means that any time you update the system those values will get overwritten, so you'll have to remember to update them again after each upgrade.
phaselbo replied on at Permalink Reply
Hi

After doing that it the Block is still not listed their.

What I did now is to import the DB backup, changes the variable in the controller.php
in /concrete/blocks/content/controller.php
refresh the block, but it still gone their.

This is not really a perfect solution.

Can't I change this value in the DB?

Cheers
jordanlev replied on at Permalink Reply
jordanlev
Sorry but I don't know where this can be changed in the DB (I'm sure it's possible but I don't know where that is).
nerdess replied on at Permalink Reply
nerdess
for all who wonder: you also need to update the block to trigger this. so you need to increase its version number and then upgrade it in dashboard -> update. at least that is what i had to do....