Hi,
I am using @directory to get images from a folder into a select field
@DIRECTORY images/myimages
In my document the TV displays correctly the list of images, I can select the image I want, but when viewing the source i get
<img class="storiesFloatImg" width="158" height="108" src="/assets/images/storiesSAMPLE1.jpg"/>
storiesSAMPLE1.jpg should be stories/SAMPLE1.jpg
I also tried
@DIRECTORY images/myimages
/
Same result.
Any ideas?
Thank You
EDIT:
the values in the dropdown menu in manager are correct
<option value="/assets/images/stories/SAMPLE1.jpg">SAMPLE1.jpg</option>
<option value="/assets/images/stories/SAMPLE2.jpg">SAMPLE2.jpg</option>
<option value="/assets/images/stories/SAMPLE3.jpg">SAMPLE3.jpg</option>
but somewhere a / is lost
Is this a modx bug?
SOLVED
I had an old value in the database.
Use @DIRECTORY images/myimages/ (note the last slash)