From fc3f27201c1931e76cc3bb3fe3dc65da1a13f4e1 Mon Sep 17 00:00:00 2001 From: MatthieuLP <60923356+MatthieuLP@users.noreply.github.com> Date: Wed, 31 Aug 2022 14:40:38 +0200 Subject: [PATCH] Updated Technical changes in Piwigo 13 (markdown) --- Technical-changes-in-Piwigo-13.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Technical-changes-in-Piwigo-13.md b/Technical-changes-in-Piwigo-13.md index ecb374f..5280519 100644 --- a/Technical-changes-in-Piwigo-13.md +++ b/Technical-changes-in-Piwigo-13.md @@ -39,26 +39,26 @@ window.onload = function(e){ As we added SVG support in Piwigo gallery, this change will affect custom themes. If theme developers also want to support SVG files, they will need to add this condition to their modified ```picture_content.tpl``` file. ``` -{if {$current.path_ext} == 'svg'}src="{$current.path}" +{if (isset($current.path_ext) and $current.path_ext == 'svg')}src="{$current.path}" ``` This is necessary if you modified the default ```picture_content.tpl``` file for your theme otherwise, if your theme inherits the default theme, you can leave it as it is. For the previous image you'll need to add the following condition ``` -{if {$previous.path_ext} == 'svg'}{$previous.path} +{if (isset($previous.path_ext) and $previous.path_ext == 'svg')}{$previous.path}{/if} ``` And add a class to the img using ``` -class="{if {$previous.path_ext} == 'svg'}svgImg{/if}" +class="{if (isset($previous.path_ext) and $previous.path_ext == 'svg')}svgImg{/if}" ``` Same for the next image. ``` -{if {$next.path_ext} == 'svg'}{$next.path} +{if (isset($next.path_ext) and $next.path_ext == 'svg')}{$next.path}{/if} ``` And add a class to the img using ``` -class="{if {$next.path_ext} == 'svg'}svgImg{/if}" +class="{if (isset($next.path_ext) and $next.path_ext == 'svg')}svgImg{/if}" ``` We implemented the following classes to support SVG but also any other formats : ```file-ext-{{the file extention}}``` and ```path-ext-{{the file's path extention}}```. These will be used to custom the gallery if needed.