From 4150ccb0f91cedca6c1d6aace1126f21e8a3183a Mon Sep 17 00:00:00 2001 From: Suhype <26964239+ammannbe@users.noreply.github.com> Date: Thu, 24 Nov 2022 10:37:07 +0100 Subject: [PATCH] fixed Icons are not listed in admin if using revAssetUrls #2 --- CHANGELOG.md | 4 ++++ composer.json | 2 +- .../_components/fields/HOMMIconsField_input.twig | 13 ++----------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c73dfa..e6cabd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 1.0.2 - 2022-11-24 + +- Fixed: Icons are not listed in admin if using revAssetUrls [#2](https://github.com/HOMMinteractive/hommicons/issues/2) + ## 1.0.1 - 2022-07-22 - Revert: add removed attribute... diff --git a/composer.json b/composer.json index fbf8703..6c5db15 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "homm/hommicons", "description": "Craft CMS Icon Picker", "type": "craft-plugin", - "version": "1.0.1", + "version": "1.0.2", "keywords": [ "craft", "cms", diff --git a/src/templates/_components/fields/HOMMIconsField_input.twig b/src/templates/_components/fields/HOMMIconsField_input.twig index 5b9dcf3..5b61d7a 100644 --- a/src/templates/_components/fields/HOMMIconsField_input.twig +++ b/src/templates/_components/fields/HOMMIconsField_input.twig @@ -19,8 +19,7 @@ {% for icon in icons %} {% if icon.getFilename(false) == value %} - {% set iconSvg = icon.getUrl()|slice(1) %} - {{ svg(iconSvg) }} + {{ svg(icon.getVolume().path ~ '/' ~ icon.getPath()) }} {% endif %} {% endfor %} @@ -39,13 +38,11 @@
{% for icon in icons %} {% if icon.folder == 'icons' %} - - {% set iconSvg = icon.getUrl()|slice(1) %} - {{ svg(iconSvg) }} + {{ svg(icon.getVolume().path ~ '/' ~ icon.getPath()) }} {% endif %} @@ -64,9 +61,3 @@
- - - - - -