Page 1 of 1

Alternative layout support for Phoca Gallery Image Module

Posted: 08 Mar 2017, 22:07
by Doomas
Hi,

I often use template overrides in custom templates for my clients. And therefore it would be very nice if you could add support for alternative layouts on the Phoca Gallery Image Module.

Bellow you can find the patch witch would enable this option.

Code: Select all

diff -u org/mod_phocagallery_image.php patch/mod_phocagallery_image.php
--- org/mod_phocagallery_image.php      2016-05-16 01:43:14.000000000 +0200
+++ patch/mod_phocagallery_image.php    2017-03-08 20:47:18.296160352 +0100
@@ -107,6 +107,8 @@
 $tmpl['jakdescription']                                = $params->get( 'jak_description', 1);
 $tmpl['jakdescriptionheight']          = $params->get( 'jak_description_height', 0);
 
+$alternative_layout                 = $params->get( 'alternative_layout', 'default');
+
 
 if ($imageSize == 'small') {
        $tmpl['imagewidth']     = $small_image_width;
@@ -1181,5 +1183,5 @@
        $output[$i] = ''; // there is no image to get it as random image
 }
 
-require(JModuleHelper::getLayoutPath('mod_phocagallery_image'));
-?>
\ Kein Zeilenumbruch am Dateiende.
+require(JModuleHelper::getLayoutPath('mod_phocagallery_image', $alternative_layout));
+?>
diff -u org/mod_phocagallery_image.xml patch/mod_phocagallery_image.xml
--- org/mod_phocagallery_image.xml      2016-05-15 23:10:34.000000000 +0200
+++ patch/mod_phocagallery_image.xml    2017-03-08 20:46:37.196734800 +0100
@@ -318,7 +318,8 @@
        value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
 </field>
 
-
+<field name="alternative_layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" />
+
                        </fieldset>
                </fields>
        </config>


Regards Thomas

Edit: Sorry I've read the sticky post about the feedback just now.....should I post it there too?

Re: Alternative layout support for Phoca Gallery Image Module

Posted: 09 Mar 2017, 20:33
by Jan
Hi, thank you for the info, I will take a look at it for the next version.

Thank you, Jan

Re: Alternative layout support for Phoca Gallery Image Module

Posted: 27 Jun 2017, 09:01
by Jan