I wonder how to override the favicon for a certain content type and View page ? Any module can do this ? If I were to override the "page.tpl.php" template, what is the theme suggestion for content type and Views page ? I have tried to create a new layout, but Layout can not override the content in the <head> tag, only the content inside the <body> tag. Please advise. Thanks!
Most helpful answers
Comments
@simone960 - I've never done this and can't think of any solution found in the user interface. I think that you'll need some custom code. Some thoughts:
1) I think this module changes the favicon based upon environment, maybe the code can be used to do the same thing based upon content type?
2) Could you edit the page.tpl.php file with code that checks for content type and changes favicon based upon results?
I don't know the answer, but these are some ideas that might help you figure it out. Good luck.
Thanks @stpaultim for your sharing! I know very little programming actually ><. Writing code probably is the last thing I will do. @indigoxela suggested a hook. I will try it out and see. There's a will there's a way. Thanks !
Hi simone960,
I belief, the metatag_favicons module - which is a submodule of the Metatag module, provides that.
I have to admit, that I never did that, but it seems worth a try. Maybe it doesn't work for Views pages... (?).
If you have a custom theme and are willing to do a little coding, hook_html_head_alter() could be an option. You would use that hook in your theme's template.php file.
Thanks @indigoxela for your suggestions! Indeed searching for while I realised Metatag comes with a submodule for favicon but pity when I enabled the submodule I couldn't find anywhere to override it. No interface at all. Bug ? I submitted an enquiry on their issue queue. If you find out how it works please let me know. Thanks !
Where to override favicon ? #71
The hook looks promising, I will give it a go! Great thanks !
Hi simone960,
I belief, the metatag_favicons module - which is a submodule of the Metatag module, provides that.
I have to admit, that I never did that, but it seems worth a try. Maybe it doesn't work for Views pages... (?).
If you have a custom theme and are willing to do a little coding, hook_html_head_alter() could be an option. You would use that hook in your theme's template.php file.