| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
html tags in language variables | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
html tags in language variables
Hi guys
I'm trying to add a google map link to the contact on the footer: <a href="https://www.google.ca/maps/place/2120+Bristol+Cir,+Oakville,+ON+L6H+6P5/@43.5129587,-79.6730482,17z/data=!3m1!4b1!4m2!3m1!1s0x882b4375072b56af:0xc64bf cd8c3e36361" target=_blank">map</a> But instead of just displaying the word map in the footer with the link, it shows all the above text in its entirety. Are there certain tags that are not allowed?
__________________
X-Cart Version 4.5.4 Version 5.1.11 Version 5.2.15 x3 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: html tags in language variables
I believe it depends on the template that displays the language variable.
Some templates use modifiers that escape special characters, other templates show language variables "as is".
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: html tags in language variables
Hi Alex
We are using the clothing template. Some of the language variables have html tags in them.
__________________
X-Cart Version 4.5.4 Version 5.1.11 Version 5.2.15 x3 |
|||||||
#4
|
|||||||||
|
|||||||||
Re: html tags in language variables
I mean template files, not the "design template" itself. Language variables are displayed from template files, and some template files escape special characters, while others don't do this.
You should find the file that displays the message and change it so that it won't escape HTML tags. Is it for X-Cart 4, or X-Cart 5? These versions use different template engines, so the answer will be different.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#5
|
|||||||
|
|||||||
Re: html tags in language variables
HI Alex
We are using xcart 5.2.13. From our understanding we need to use webmaster mode and edit the template file that way and not from the language variables?
__________________
X-Cart Version 4.5.4 Version 5.1.11 Version 5.2.15 x3 |
|||||||
#6
|
|||||||||
|
|||||||||
Re: html tags in language variables
There are two parts:
- the language variable - the template file that displays the language variable If you want to insert the HTML to into the language variable, you should edit the variable. However, some templates escape HTML in language variables. If this happens to you, you should edit the template too and add ":h" modifier to the code that displays the language variable. For example, in the attached screenshot I was editing the template that displays the welcome text on the home page. It is not a language variable, but the idea is the same. The text is displayed by this code: "{getDescription():h}". Without the ":h" the template will escape HTML in the text. This is what you should add to the template if you want it to render HTML as it is. However, please note that this may raise the risk of your site being hacked. Don't render HTML in text that was supplied by regular users.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|