$this->addHeadLink(HTMLHelper::_('image', 'sagacicweb-favicon.svg', '',, true, 1), 'icon', 'rel', ) OK, here is how I changed the head section of index.php and then I just have to place the actual files in an appropriate location. So it seems like if I just play with this I can get the kind of links I want added to the head section. Image(string $file, string $alt, array|string $attribs = null, boolean $relative = false, integer $returnPath) : string|null Response - mixed - Result of HTMLHelper::call($function, $args) $key - string - The name of helper method to load, (prefix).(class).function prefix and class are optional and can be used to load custom html helpers. Response - \Joomla\CMS\Document\HtmlDocumentinstance of $this to allow chaining Either rel or rev (default: 'rel').Īttribs - array - Associative array of remaining attributes. RelType - string - Relation type attribute. Href - string - The link that is being related. ('rev' refers to reverse relation, 'rel' indicates normal, forward relation.) Typical tag: $relType - defaults to 'rel' as it is the most common relation type used. What does addHeadLink(HTMLHelper:: handle? I can see from this all the parameters that can be passed in, but what values for those parameters will addHeadLink(HTMLHelpewr:: recognize?ĪddHeadLink(string href, string relation, string relType = 'rel', array attribs = array()) : \Joomla\CMS\Document\HtmlDocument The thing is, this little head section needs to be greatly expanded so that all variety of favicons can be handled. $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '',, true, 1), 'mask-icon', 'rel', ) $this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '',, true, 1), 'alternate icon', 'rel', ) Here is what Joomla 4/Cassiopeia provides. There are more file that should be included to handle some of the more obscure devices out there, because even though they are obscure, they represent millions of users. I realize that today that may represent a security vulnerability so instead this is probably better handled programmatically. Normally I would just place these in the root directory. Here is a list of the minimum favicon files I need to be loaded. It would be really nice, wouldn't it, if a member of the Joomla development team occasionally looked in to save us poor amateurs lots of time. I can say definitely that only adding the. So when I added the two icon files, the Joomla standard favicon was replaced with a splodge. Sadly, I have not been able to test this properly at the moment because the online ICO-to-SVG converters are failing to convert my icon properly. I think this may well solve your problems. And I believe that this is a folder that will not be altered when Joomla updates, so you will not loose your own favicon. If you look at the page source for your website before and after these changes, you will see that the URL for the icon files will have changed from /media/system/images to /media/templates/site/cassiopeia/images, and so will be picking up YOUR icon files rather than the Joomla default ones. SVG format, with the name joomla-favicon.svg, AND (probably) in. In J4.1, I have established that you need to put the overrides in /media/templates/site/cassiopeia/images.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |