We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27376
    • 576 Posts
    My apologies. Initial code was inaccurate. It has now been updated.
      • 33372
      • 1,611 Posts
      That function is wacky anyway. AFAIK it doesn’t actually return the output value (i.e. with filter or widget applied), and last I checked it didn’t add separators to listbox and checkbox TVs. I often fall back to a regular mySQL query when the TV I need the value for has multiple selections.
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 2690
        • 148 Posts
        i see ... even with the updated code i receive:
        array(1) { ["SKIN_HS_Image"]=>  string(66) "http://www.domain.com:8383/assets/images/skin/hs_blackdiamond.jpg" }


        Let me explain better what i’m trying to do here, maybe there is another solution for that:

        TopCategory 1
        Sub Cat 1
        Page A
        Page B
        Sub Cat 2
        Page C
        Page D

        So ’Pages A-D’ have TV: SKIN_HS_Image (page image without any widget attached to it, so i only need the image url value)
        On ’TopCategory 1’ i want to randomly show all images from ’page A-D’ TV.

        I figured it should be pretty straight forward, but got stuck on pulling the tv value smiley

        Thank you for all your help !

        Aleks
          MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
          • 33372
          • 1,611 Posts
          Perhaps this is an image TV issue? If you make your TV a text field instead and insert the URL for it there does it work? What version of MODx are you using?
            "Things are not what they appear to be; nor are they otherwise." - Buddha

            "Well, gee, Buddha - that wasn't very helpful..." - ZAP

            Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
            • 2690
            • 148 Posts
            i’m on 0.9.5
            well i could try the text field but i want to utilize the modx image upload functionaity ...
              MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
              • 33372
              • 1,611 Posts
              I haven’t experimented much with image TVs (I probably should, but not today). How about if you try using $tv[’SKIN_HS_image’][0] in your script? Or $output=$tv[’SKIN_HS_image’]; return $output[0];
                "Things are not what they appear to be; nor are they otherwise." - Buddha

                "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options