-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Favicon option unnessecary? #27
Comments
Probably turns usefull when someone use tools like https://realfavicongenerator.net/ and want to have favicons elsewhere than site root or template root (not my case tbh). |
Maybe just remove the default value then so it can be removed. I guess that's not a big issue anyway since people who don't need it can just delete the option. |
Hi @robwent , |
The favicon option has a default value set here: /~https://github.com/sniggle/joomla-bootstrap4-template/blob/master/bootstrap4/templateDetails.xml#L67 When you set a default value, it's not possible for the user to save a blank field. Therefore, the check to see if the field has a value set here: /~https://github.com/sniggle/joomla-bootstrap4-template/blob/master/bootstrap4/index.php#L61 will always return true. Since the default points to the same place Joomla loads the favicon from anyway, you just get 2 favicon lines in the head of the doc. The best option to me seems to be to remove the field and the favicon.ico from the theme. Then the user can add their own to the template (Which won't get replaced on an update). If you think the option is a good idea, then the default value should be removed and the favicon.ico removed from the theme. Then Joomla won't load up the favicon that exists in the theme and the theme will only add the favicon line if the user adds a value to the field. |
Just to add some info, it appears that most browsers check for favicons on the site root anyway. |
Joomla also adds the favicon link if one exists in the root of the site. If there is one in the root of the site, Joomla will add that. |
Hi @robwent , I assume some users use the template without customization. As I don't want to remove that feature for them, I removed the default value to override the favicon only if intended. |
… entry in HTML, if not overridden. Added hint to template config page accordingly.
If the theme folder contains a file called favicon.ico then Joomla loads it automatically.
As the field has a default value, you can't stop the theme from loading it as it will default to /templates/bootstrap4/favicon.ico even if it doesn't exist.
The text was updated successfully, but these errors were encountered: