- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Referencing a folder
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..
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Holger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Holger

