How to use environment variable in slot-content ?

I added a custom property to the nuxeo.conf file. I want to use this custom property in webui.

For exemple in slot-content

<nuxeo-slot-content name="defaultMY_SLOT_NAME" slot="MY_SLOT_NAME">
  <template> <my-element my-element-property=[[my-custom-property-from-nuxeo.conf]]>
</my-element>
</template> 
</nuxeo-slot-content>

Thank you in advance, Ahmad.

0 votes

1 answers

809 views

ANSWER



Hello,

I don't think this use case exists in Web UI. The only thing I know is to retrieve any value from nuxeo.conf on the backend part (Modeler) using Env["my.nuxeo.conf.key"] in an automation scripting for example. So, the idea would be to retrieve this value on the Polymer part of your element calling an automation scripting returning this value. Probably better options exist.

Regards

0 votes



Hello, Thank you for the answer, I have already tested a solution like yours except that I used a JAVA operation instead of scriptiing automation and it works if I call this operation for example in the function ready but I did not find (maybe not possible) how to call an operation to initialize a parameter directly in a tag without going through a script.

Thank you

04/11/2020