• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Widget creation

New Here ,
Jul 27, 2017 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

504

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
community guidelines
Guide ,
Jul 27, 2017 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

Votes

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
community guidelines
New Here ,
Jul 27, 2017 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

Votes

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
community guidelines
Guide ,
Jul 27, 2017 Jul 27, 2017

Copy link to clipboard

Copied

LATEST

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

Votes

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
community guidelines