cancel
Showing results for 
Search instead for 
Did you mean: 

Multilingual path to launch script

ribz33
Champ on-the-rise
Champ on-the-rise
Hi,

I'm trying to make an action which launch a script, but path is only valid with english interface :

This is working but only in english interface :
<script>/Company Home/Data Dictionary/Scripts/addCustomAspect.js</script>

then, I tried this :

<script>/${spaces.company_home.name}/${spaces.dictionary.name}/${spaces.scripts.childname}/addCustomAspect.js</script>
but its not working Smiley Sad

Is there a way to do it ?

Thx in advance.
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
The path is based on cm:name values - they didn't used to change when the language was changed. But since ML functionality was added, and is available on cm:name properties, it looks like that's no longer going to work! I'll raise an issue for it.

For a work-around, a NodeRef can be used in place of a path to a node. So copy the 'Alfresco Node Reference' from the details page of the script and put that into your <script> config block.

Thanks,

Kev

kevinr
Star Contributor
Star Contributor
Ah. I've just been reminded that cm:name does NOT use the ML features - it's title/description etc. So simply changing the Path string you are using to match the values in your DB will work.

Thanks,

Kevin

ribz33
Champ on-the-rise
Champ on-the-rise
Ok its working now.

So to launch a script in an action you have 2 ways :
- <script>name/name/…</script>
- or <script>workspace://SpacesStore/8de5d…..</script>

I think there is a little bug with encoding with script path.
In french version Data Dictionary = Dictionnaire de données
and the "é" character make an error on path.
I needed to rename space to make it working.

Thx for help.