View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006563 | OXID eShop (all versions) | General | public | 2016-12-09 10:21 | 2024-04-17 07:38 |
Reporter | vanilla thunder | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 7.0.0 | ||||
Summary | 0006563: getImageUrl() is bad for Shop Logos! | ||||
Description | URLs for all shop logos (Website and Emails) are provided by function oxViewConfig->getImageUrl(), which is very bad because of these two reasons: 1) image is expected to be in out/flow/img/ folder, but shop logos are clearly not a part of the template. Shop owners might seasonally change their logos (e.g. for christmas) by editing theme config in shop. Therefore shop logo should be placed somewhere in out/pictures/, i suggest wysiwigpro/ since it is used by filemanagers. 2) since getImageUrl() expects theme/template related images, it always assumes that this file exists. If this file does not exist (e.g. someone deleted christmas themed logo from the server but did not change theme config param), this function returns empty string, which results in an empty image tag <img src="" /> which loads the start page and doubles page loading time and size. This is very bad! Right now i use [{$oViewConf->getPictureDir()|cat:'wysiwigpro/'|cat:$slogoImg}] in my templates, but it is very dirty. oxConfig->getPictureUrl() should be used for content related images, but there is currently no implementation in oxViewConfig or oxUBase / oxView. So need a getPictureUrl() in oxViewConfig first. | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
Moved from flow theme project to OXID and classified as feature request. For most shops the usage of this function is fine, but for some shops it would be a useful feature to load the logo from the Media Library. |
|
With the media library for OXID 7.0 you can now use something like <img src='{{ oViewConf.getMediaUrl() }}logo.png' /> to include a logo from the media library instead. |