Search code examples
typo3-9.x

Where and how to place apple-touch-icon in TYPO3 app


I'm getting the following error in the backend:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1518472189: The requested page does not exist | 
TYPO3\CMS\Core\Error\Http\PageNotFoundException thrown in file /var/www/vhosts/my-doma.in/typo3/sysext/frontend/Classes/Controller/ErrorController.php in line 80.
Requested URL: https://my-doma.in/apple-touch-icon-120x120.png 

To place an apple icon one apparently should add:

<link rel="apple-touch-icon" href="/path/to/apple-touch-icon.png">

somewhere, as seen here: https://stackoverflow.com/a/21144916/4120196

But given a TYPO3 (v9.5) application - Where and how should I to add this?


Solution

  • I found a way after stumbling on the headerData property - added this to my TypoScript root template:

    page.headerData {
           1 = TEXT
           1.value = <link rel="apple-touch-icon" href="fileadmin/path_to_icons/apple-touch-icon.png">
    }
    

    And I found this answer when it comes to Android as well.
    My android browser seemed to be happy already with the apple icon though.