Index > Feature request > A new insert tag {{env::page_lang}}
Hi Leo,
I have a french site with dynamic background images.
Now, I want to create an english version (in the future maybe more languages), and if possible don't create new layouts. I want to organize my 'images' folder by language.
Example of what I have in my layout :
Example of what I want :
If you don't want to add this feature in the core, is it possible to tell me what I can change to do this ?
I have a french site with dynamic background images.
Now, I want to create an english version (in the future maybe more languages), and if possible don't create new layouts. I want to organize my 'images' folder by language.
Example of what I have in my layout :
Code:
<style type="text/css"> #container { background-image: url(/tl_files/images/fr/backgrounds/{{env::page_alias}}.jpg); } </style>
Example of what I want :
Code:
<style type="text/css"> #container { background-image: url(/tl_files/images/{{env::page_lang}}/backgrounds/{{env::page_alias}}.jpg); } </style>
If you don't want to add this feature in the core, is it possible to tell me what I can change to do this ?
2008-02-07 09:27
Hi Cyril,
style sheets are not parsed by the PHP interpreter, therefore that is impossible to accomplish, I am afraid :-( If at all, you can probably develop a JavaScript based solution.
Regards
Leo
style sheets are not parsed by the PHP interpreter, therefore that is impossible to accomplish, I am afraid :-( If at all, you can probably develop a JavaScript based solution.
Regards
Leo
2008-02-07 10:26
Hi Leo,
I think you read my previous post too much quickly
My problem is not the css, my css code is in a layout and works, I want just add the language code dynamicaly, that's all...
I think you read my previous post too much quickly
My problem is not the css, my css code is in a layout and works, I want just add the language code dynamicaly, that's all...
2008-02-07 10:33
Hi Cyril,
you are right :-) I am sorry. The good news is that there is a way to accomplish it already.
Regards
Leo
you are right :-) I am sorry. The good news is that there is a way to accomplish it already.
Code:
<style type="text/css"> #container { background-image: url(tl_files/images/fr/backgrounds/<?php echo $this->language; ?>.jpg); } </style>
Regards
Leo
2008-02-07 10:46
Hi Leo,
It's so simple, I not thought of this, sorry
Thanks Leo,
It's so simple, I not thought of this, sorry
Thanks Leo,
2008-02-07 11:00
