Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-7662

Not possible to have icons in an extension, only one theme can be used for icons

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 3.6.4
    • Misc
    • None
    • Version: 3.6.4
      PHP Version: 4.3.10-16
      Webserver: Apache/1.3.33
      Database: mysql 4.1.13

    Description

      Icons are always bound to one single repository. This makes the hole icon-engine in eZ publish uncomfortable, especially in mulit-site environments.

      It would be much easier to have an icon engine, behaving simmilar to the template engine, which is capable of loading template out of different design, using a fallbacvk design and even can load things from extensions.

      The following behaviour would be great:

      1. Load icon themes via a extensions
      2. Have a standard theme on which the engine falls back if an icon can't be found in the current theme
      3. Have a list of additional themes, where the engine looks for icons before falling back to the standard theme
      4. Don't break compatibility with the existing behaviour

      As we need this feature for a current project, we patched eZ publish to exactly do what I told.
      To have icons in an extension by using this patch, do the following:

      • Extract the file you can download on this page
      • Either use the .patch file do patch your existing eZ publish v 3.6.4 or
        copy the file in kernel/common/ and settings/ to you eZ publish 3.6.4 installation
      • Take a look into your new settings/icon.ini you will find the following new settings:
        [IconSettings]
        # The standard theme. It is used as fallback theme
        # if the element is not avalible
        StandardTheme=crystal
        
        # AdditionalThemeList contains an array
        # of themes. These themes will be used
        # if an icon was not found in the main
        # theme. StandardTheme is the fallback theme.
        AdditionalThemeList[]
        
        [ExtensionSettings]
        # A list of extensions which have theme data
        # It's common to create a settings/icon.ini.append file
        # in your extension and add the extension name to automatically
        # get themes from the extension when it's turned on.
        IconExtensions[]
        

      To have icon themes in an extension, place them in /extensions/YOUREXTENSION/icons/YOURTHEME,
      where YOUREXTENSION is the name of one of your extensions and YOURTHEME is a new theme.
      Then set in [ExtensionSettings] the setting IconExtensions[] to:
      IconExtensions[]=YOUREXTENSION

      To make use of additional themes, name them using AdditionalThemeList[], eg.:
      AdditionalThemeList[]=blue
      AdditionalThemeList[]=exotic

      And make shure they exists either in an extension or in the default repository.

      Any feedback is welcome...

      -------------------------
      <b>Note:</b>
      You can find the most recent version of this patch always on pubsvn.ez.no:
      http://pubsvn.ez.no/community/trunk/hacks/icons_in_extension/
      -------------------------

      Attachments

        Activity

          People

            unknown unknown
            dabe dabe
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: