Copy link to clipboard
Copied
Dear all,
I would like to create an item where I can see UID in parameter list. I need this information for a personal JS.
This part of the code has a problem :
<parameters>
<builtIn name="itemUID"/>
<text name="divUID" label="divUID" defaultValue='$itemUID' />
What is the solution to see itemUID in the parameters' list of my widget.
Thanks all
Yann
Copy link to clipboard
Copied
Parameters don't work like this, as many of the attributes are only generated when published. They can only be passed into JavaScript, CSS and HTML. The format in this example would be {param_itemUID}.
David
Creative Muse
Copy link to clipboard
Copied
Yes but i would like to obtain information ( ID generated by Muse) about all my div div.
Is there a solution ?
Thanks
Copy link to clipboard
Copied
Placing the {param_xxxx} name anywhere in the code section (HeadHTML, BodyBegin, BodyEnd, etc.) of the widget will substitute in the value, it's just not possible to pass parameters within the parameter section of the widget code. So in CSS, for example, you could do the following:
#{param_itemUID} {
border: {param_borderSize}px;
}
Which will translate to
#u34567 {
border: 5px;
}
I hope this helps.
David
Creative Muse