We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5340
    • 1,624 Posts
    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)
      • 4749
      • 623 Posts
      Sometimes it’s the simplest of things that gets you. Heaven knows I’ve been caught by the little things far too often.

        The MODx has you...
        Utah Web Design