WebsiteBaker Support (2.11.x) > General Help & Support
favicon
applepie:
Hi, where do drop or save the favicon? Thanks
sternchen8875:
for search engines the right place is in your root directory of this domain, but not every browser read it from there automatically. best method is a link in the head of your index.php (from the template) and with this link, you can set the path, so it doesn't matter, where you have the favicon, if the patzh is correct
applepie:
Hi, How do you link with the index file? Is there is code or sample I can see?
Thanks
sternchen8875:
Here some ofiicial informations about the thematic -> https://www.w3schools.com/html/html_favicon.asp
pls remember: every kind of file-type needs a special call.
for example:
GIF
--- Code: ---<link rel="icon" type="image/gif" href="THE_COMPLETE_PATH TO_THE_FILE/FILENAME.gif">
--- End code ---
PNG
--- Code: ---<link rel="icon" type="image/png" href="THE_COMPLETE_PATH TO_THE_FILE/FILENAME.png">
--- End code ---
ICO
--- Code: ---<link rel="icon" type="image/x-icon" href="THE_COMPLETE_PATH TO_THE_FILE/favicon.ico">
--- End code ---
SVG
--- Code: ---<link rel="icon" href="THE_COMPLETE_PATH TO_THE_FILE/favicon.svg" type="image/svg+xml">
--- End code ---
you can use the WB-Constant WB_URL or TEMPLATE_DIR in the path
WB_URL is the path to the root of this WB-Installation
TEMPLATE_DIR is the path to your on this page active frontend-template
example for favicon.ico in the root
--- Code: ---<link rel="icon" type="image/x-icon" href="<?php echo WB_URL; ?>favicon.ico">
--- End code ---
or (short version)
--- Code: ---<link rel="icon" type="image/x-icon" href="<?= WB_URL; ?>favicon.ico">
--- End code ---
example for favicon.ico in your frontend-template
--- Code: ---<link rel="icon" type="image/x-icon" href="<?php echo TEMPLATE_DIR; ?>favicon.ico">
--- End code ---
or (short version)
--- Code: ---<link rel="icon" type="image/x-icon" href="<?= TEMPLATE_DIR; ?>favicon.ico">
--- End code ---
also possible
--- Code: ---<link rel="shortcut icon" href="<?= TEMPLATE_DIR; ?>favicon.ico" type="image/x-icon">
--- End code ---
P.S.: its a good solution, if you have a favicon.ico in the root fot the automatic browser detection and if you need, another icon (like the apple-touch-icon) in your frontend-template
apple use a special form and call it "apple touch icon". it has more possibilities about size and resolution. You can use both kind of icons
--- Code: ---<link rel="apple-touch-icon" href="<?= TEMPLATE_DIR;?>apple-touch-icon.png">
--- End code ---
applepie:
Thanks. Do you mean the index.php in the template directory?
Navigation
[0] Message Index
[#] Next page
Go to full version