iTop icon indicating copy to clipboard operation
iTop copied to clipboard

N°3777 - favicon: change easily favicon

Open accognet opened this issue 1 year ago • 6 comments

Allow customization of favicon and logo depending on environment:

define them in XML first:

<brandings>
  <branding id="default">
      <main_favicon _delta="define">
        <fileref ref="main_favicon_default"/>
      </main_favicon>
      <login_favicon _delta="define">
        <fileref ref="login_favicon_default"/>
      </login_favicon>
      <portal_favicon _delta="define">
        <fileref ref="portal_favicon_default"/>
      </portal_favicon>
      <portal_favicon _delta="define">
        <fileref ref="portal_favicon_default"/>
      </portal_favicon>
      <main_logo _delta="define">
        <fileref ref="main_logo_default"/>
      </main_logo>
  </branding>
  <branding id="test_env">
      <main_favicon _delta="define">
        <fileref ref="main_favicon_test"/>
      </main_favicon>
      <login_favicon _delta="define">
        <fileref ref="login_favicon_test"/>
      </login_favicon>
      <portal_favicon _delta="define">
        <fileref ref="portal_favicon_test"/>
      </portal_favicon>
      <main_logo _delta="define">
        <fileref ref="main_logo_test"/>
      </main_logo>
  </branding>
<brandings>

and then you can choose different favicon and logo using the configuration file:

// branding_environment: type of branding. usefull for put different logo depending environment 'branding_environment' => 'test', ( portal favicon can also be customized in module_design:

  <module_designs>
    <module_design  id="itop-portal-customer"  _delta="must_exist">
      <properties>
        <favicon _delta="define">
          <fileref ref="logo_port_customer"/>
        </favicon>
      </properties>
    </module_design>
  </module_designs>

)

accognet avatar Feb 26 '24 17:02 accognet

What about themes? They are defined under the <branding> node, we can't duplicate them in each new <branding id="xxx"> node.

Molkobain avatar Feb 28 '24 17:02 Molkobain

Mind that favicon might not be a single file Check https://www.emergeagency.com/insights/detail/the-essentials-of-favicons/

piRGoif avatar Aug 21 '24 13:08 piRGoif

And more recent: https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7

Hipska avatar Aug 21 '24 14:08 Hipska