Elxis CMS Forum
Support => Elxis 4.x/5.x DEV => Topic started by: speck on May 27, 2013, 14:26:52
-
in /templates/system/css/standard.css and /templates/system/css/standard-rtl.css
find and replace the string "../images/" with "/templates/system/images/"
because if you enable the option CSS/Jscript minifile, the background image will not showed!!!!!!!
-
It is not a bug!
You must re-write the image links in your template's css to:
A. overwrite standard.css
B. use absolute URLs or relative from your web root.
Read the "Special care on the CSS minifier" section on the documentation page about the minifier (https://www.elxis.net/docs/using-elxis/advanced-users/minifier.html).
Note: We can't implement this solution in the built-in templates as the Elxis install dir in unknown (Someone might install it in the web root an other one inside a folder). So you have to do it by yourself.
-
You must re-write the image links in your template's css to:
sorry, i don't understand why... in this way i need find all images in background to insert in css template??? why this???
if for me are good the original i don't understand this. the absolute path works in any case also with minifier disable. is not better to have by default the standard css with complete url /templates/system/images/
if i want, as soemone wants use some custom images in background, the original class need to be overwrite using the css of the template.
-
The CSS minifier is an advanced tool, for advanced users, that understand the basic aspects of CSS and know what to do.
The System template (standard.css) is a fail over template and not your problem. Focus on your template and not on standard.css. I advice you not to enable the css minifier unless you know how to use it.
-
I know how works minifier. :)
So if i do a commercial as a free template or extensions use images in background, your tips is to do compatible with minifer or not?
To do it all compatible with minifier is a job of a developer or of the final user?
if is compte of final user, well, i'll re-rewrite all my extension because i did them compatible with minifier. (example "/templates/mytemplates/images/")
i don't understand what is the problem. i tried to replace "../images/" with "/templates/system/images/" in standard.css and all works fine in local and on webserver with minifier enabled and not enabled, also with custom css where i changed colors border, text color and so on, because in first time i had la ot of problem (standard images in background non showed) and chek it i found where was the problem.
if the problem is the "/template/mytemplate/...." as "/templates/system/images/" not works on some server... this is another thing and problem. in this case the compte is of the final user.