Elxis CMS Forum

Support => General => Topic started by: seadhna on July 06, 2025, 14:54:06

Title: XML parameter types - attribute to allow HTML tags?
Post by: seadhna on July 06, 2025, 14:54:06
When building an Elxis template, is there a parameter attribute to allow HTML tags?

e.g.  Optional attribute multilingual (value: 0 or 1). If multilingual = 1 then the text element becomes multilingual and the user is able to apply different values for each language.
e.g. <param type="text" name="myaddress" default="" label="Address" description="" multilingual="1" />

Basically I want to allow some simple HTML styles, e.g. <strong></strong> <sup></sup>

I have been trying to find the answer in the docs, e.g. https://www.elxis.net/docs/developers/libraries/elxisparameters.html
Apologies if it's already explained somewhere in the docs.
Title: Re: XML parameter types - attribute to allow HTML tags?
Post by: datahell on July 09, 2025, 22:19:27
No, why to do such a thing? There are workarounds on this (eg use replacements like BBcode bold, etc), but as you develop your own template you don't need such parameters. Apply the style in your template directly.
Title: Re: XML parameter types - attribute to allow HTML tags?
Post by: seadhna on July 11, 2025, 14:32:42
Why do such a thing? An example from your Five template: frontpage slider. Imagine, in the Caption field for a slide, if I want to write "17th event" but I want the "th" to be superscript.
Title: Re: XML parameter types - attribute to allow HTML tags?
Post by: datahell on July 12, 2025, 09:18:46
Writing HTML, and therefor javascript, in parameters is unsafe. Also it is very likely for someone to break the HTML of the page. If you want something like that you must do it elsewhere, eg with something like bbcode or find the replace.
Title: Re: XML parameter types - attribute to allow HTML tags?
Post by: seadhna on July 15, 2025, 21:44:43
Ok, I have used some jQuery