How to customize the favicon of a Plone 5.2 site?

Is there a(n easy) way to customize the favicon of a Plone 5.2 site? If not, does this Plone 4 (quite ugly) method apply to Plone 5?

To have something you can use for all your sites using the same theme, do this:

In you theme, modify rules.xml (can also be done in index.html) to something like this:

  <after theme-children="/html/head" >
    <link rel="shortcut icon" type="image/x-icon"
      href="{$portal_url}/favicon.png" />

Then you can just add an image 'favicon.png' to the root of your sites.


If you just want to do it for one site, maybe this (you just need to duplicate a theme and replace an image… not all the other stuff described ):

https://training.plone.org/5/theming/ttw-advanced.html


So: No matter how you do it, you basically just want to replace an image with another

Thanks!

There was an error with your code ("unclosed xml attribute") so I changed it for:

  <after theme-children="/html/head">
    <link rel="shortcut icon" type="image/x-icon"
      href="{$portal_url}/favicon.png">
    </link>
  </after>

after having added an image at the root of my Plone site, with name and short name favicon.png.

But I still have, as favicon, the barcelonata icon.

I also tried, at the page .../++theme++barceloneta-theme-customized/@@theming-controlpanel-mapper?..., to upload a local file but the transfer failed.

Am I doing something wrong?

I didn't notice an error displayed on the pages after the change above:

Variable 'portal_url' has not been declared.

So I proceeded as advised here and the error disappeared.

Now, I haven't the barcelonata icon as favicon, but I've nothing.

Plone Foundation Code of Conduct