{"action":"closed","issue":{"url":"https://api.github.com/repos/FluidTYPO3/flux/issues/853","labels_url":"https://api.github.com/repos/FluidTYPO3/flux/issues/853/labels{/name}","comments_url":"https://api.github.com/repos/FluidTYPO3/flux/issues/853/comments","events_url":"https://api.github.com/repos/FluidTYPO3/flux/issues/853/events","html_url":"https://github.com/FluidTYPO3/flux/issues/853","id":95437588,"number":853,"title":"Template icons not displayed in Preview (Page mode)","user":{"login":"sdelcroix","id":6229909,"avatar_url":"https://avatars.githubusercontent.com/u/6229909?v=3","gravatar_id":"","url":"https://api.github.com/users/sdelcroix","html_url":"https://github.com/sdelcroix","followers_url":"https://api.github.com/users/sdelcroix/followers","following_url":"https://api.github.com/users/sdelcroix/following{/other_user}","gists_url":"https://api.github.com/users/sdelcroix/gists{/gist_id}","starred_url":"https://api.github.com/users/sdelcroix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdelcroix/subscriptions","organizations_url":"https://api.github.com/users/sdelcroix/orgs","repos_url":"https://api.github.com/users/sdelcroix/repos","events_url":"https://api.github.com/users/sdelcroix/events{/privacy}","received_events_url":"https://api.github.com/users/sdelcroix/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-16T13:50:00Z","updated_at":"2015-07-21T19:59:16Z","closed_at":"2015-07-21T19:59:16Z","body":"Hi,\r\n\r\nSince Flux 7.2, template icons of our fluidcontent contents are not displayed in Preview, in TYPO3 \"Page\" mode.\r\n\r\nWe used both methods (path in arguments \"options\" and the convention-based one), none worked.\r\nAfter code inspection, we found that the path of the icon file is relative to the TYPO3 main directory, not to the path of the current PHP script that calls/displays the icon.\r\n\r\nWe patched it by adding backpath context to the *getIconForTemplate* method in *MiscellaneousUtility.php* file (line 82) as following.\r\n\r\n`$iconRelFolder = $GLOBALS['BACK_PATH'] . ExtensionManagementUtility::extRelPath($extensionKey) . 'Resources/Public/Icons/' . $controllerName . '/';`"}}