Referencing a folder
Author: Price
Publication Date: 2/7/2022 10:09
Hi There,
I am really hoping someone can help me out here since I am hitting my head against my desk..
I am attempting to reference to a folder within a Javascript, so it will show the path to the said folder.
skinPath: '$CMS_REF(media:"myfolder")$',
This is unfortunately coming up when I check the preview to being empty..
skinPath: '',
When the result I require is
skinPath: 'myfolder',
I have obviously attempted to it with $CMS_VALUE, but get just a huge array of errors.
Does anyone out there know how I can do this?
All help is much appreciated..
-
Author: hoebbel - 2/7/2022 10:48
Dear Price,
it isn't possible to reference a [media-]folder directly. But instead you can reference a media within the folder and appropriate shorten the URL, e.g. $CMS_VALUE(ref(media:"myMedia").url.substring(0,ref(media:"myMedia").url.lastIndexOf("/")))$
Best regards
Holger0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
1 commentaire