We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37929
    • 18 Posts
    Hi there ! TVs aren't retrieved at all in outerTpl.

    2.2.4pl - DB version 5.1.63-0

    Can someone confirm me that wf should retrieve the TVs or is it impossible ?


    [[Wayfinder? &startId=`12` &level=`1` &displayStart=`FALSE` &limit=`0` &rowTpl=`rowTpl` &startItemTpl=`startItemTpl` &outerTpl=`outerTpl` &ignoreHidden=`FALSE`]]
    


    outerTpl :
    alias : [[+alias]]  - display_style : [[+display_style]] - [[+wf.wrapper]]
    


    Thank you ! [ed. note: tulavu last edited this post 11 years, 8 months ago.]
    • It does appear that the outer Tpl is very limited in what it can process.

      You can get around this by using showStart and a startItemTpl instead.

      Unfortunately this doesn't work for the top-level resources, which makes sense as there wouldn't be anything to show as a "parent" for top-level items.

      Perhaps you could use a getResourceField snippet there instead?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • alias : [[!getResourceField? &id=`[[*id]]` &field=`alias`]]  - display_style : [[!getResourceField? &id=`[[*id]]` &includeTVs=`1` &processTVs=`1` &field=`display_style`]]- [[+wf.wrapper]]


        This sort of worked; I get a value of "Array" for the display_style TV field, and since the MODx documentation site is throwing "502 bad gateway" errors at the moment I can't do any further research on the problem. But at least it's getting close wink

        Ahah! Finally got into the documentation ( http://rtfm.modx.com/display/ADDON/getResourceField ) and discovered the correct syntax for getting a TV field's value:
        alias : [[!getResourceField? &id=`[[*id]]` &field=`alias`]]  - display_style : [[!getResourceField? &id=`[[*id]]` &isTV=`1` &field=`display_style`]]- [[+wf.wrapper]]


        [ed. note: sottwell last edited this post 11 years, 8 months ago.]
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 37929
          • 18 Posts
          Hi Susan Thanks a lot [ed. note: tulavu last edited this post 11 years, 8 months ago.]