Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Customizing the Default Array for Image Gallery in the Config

Go to End

3 Posts   965 Views

Andrew Houle

Community Member, 134 Posts

28 October 2009 at 1:52am

I'm trying to alter the defaults in the Image gallery page (ie the album width, height, etc). I would like to do so in the config file so that I can upgrade to future versions easily. I believe I can do this through a DataObjectDecorator, but I'm lost on the exact way to do so, and have found little to no documentation. Here is my code this far...


class ImageGalleryDecorator extends DataObjectDecorator {
  	static $defaults = array (
		'CoverImageWidth' => '140',
		'CoverImageHeight' => '140'



Could something like this work? Does anyone have any ideas, or can point me in the right direction? Thanks in advance.


Forum Moderator, 4102 Posts

28 October 2009 at 3:10am

Edited: 28/10/2009 3:11am

You don't need a decorator for that.


// etc...

If you were to use a decorator, though, you would use:

function extraStatics() {
return array (
'defaults' => array(
// etc..

Andrew Houle

Community Member, 134 Posts

28 October 2009 at 3:30am

Ah, that worked, thanks!