[Solved] SpecificItem option for ImageBlock within G2
TomPouce25
Joined: 2009-01-28
Posts: 13 |
Posted: Fri, 2009-01-30 17:47 |
Hi all, I would like to have an "editorial pick", a.k.a "image of the month", image in my Gallery 2.3 installation. The Image Block module is very close to what I'd like to achieve except that I need to choose the image that has to be displayed. I have seen several posts about that (e.g. http://gallery.menalto.com/node/44201) but couldn't find a way to make that work. I am new to Gallery, so please bear with me. What I did right now is modify the modules/imageblock/templates/blocks/blocks.inc file (bold stands for my additions): 'blocks' => array( This allows me to specify the specific item ID I need from the admin interface of the theme. However the "itemId" field gets lost in the way and in the end there is no image in my image block. Now if I modify modules/imageblock/Callbacks.inc to hardcode the "itemId" (e.g. 151 here), I do get the expected output. That is, My image 151 shows up in the image block. if (!isset($params['itemId'])) { Could you help me find what I need to change in order to make the whole thing work without having to hardcode the itemId? Best regards, |
|
Posts: 13
I guess it must have been a cache issue. Since the above patch now works.
I have also added the following lines in modules/imageblock/classes/ImageBlockHelper.class
case 'specificItem':
$title = $module->translate(array('one' => 'Editorial Pick',
'many' => 'Editorial Picks', 'count' => $plural));
break;
Tom