Highlighted

Widget creation

New Here ,
Jul 27, 2017

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

TOPICS
Mucow development

Views

371

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Widget creation

New Here ,
Jul 27, 2017

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

TOPICS
Mucow development

Views

372

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 27, 2017 0
Guide ,
Jul 27, 2017

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 27, 2017 1
New Here ,
Jul 27, 2017

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 27, 2017 0
Guide ,
Jul 27, 2017

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 27, 2017 0