We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33277
    • 35 Posts
    Recently added a resource of type weblink at my website root and noticed that it doesn't show up in a menu produced by getResources. Here's the snippet call:
    <ul class="menu">[[!getResources?parents=`0`&tpl=`menu-item`&depth=`0`&includeTVs=`1`&processTVs=`1`&sortdir=`ASC`]]</ul>
    

    (i need the processed TVs for different color on each button)

    Thank you for your attention.
      <em>The Earth is not the hell, and people aren't cursed, and joy in not a sin, but a gift of God.</em> (Lesia Ukrainka)
      • 813 ☆ A M B ☆
      • 326 Posts
      I don't know if this helps, but I've gleaned from this post that you need to set &includeContent=`1`.

      https://forums.modx.com/index.php?topic=55703.0

      Also, that post has a nice explanation of using output filters to alter your TPL's behavior slightly based on whether it's a resource or weblink.
        • 33277
        • 35 Posts
        Quote from: aladage at Mar 02, 2012, 03:54 PM
        I don't know if this helps, but I've gleaned from this post that you need to set &includeContent=`1`.
        Thank you... Unfortunately it doesn't help. I also tried to write url, i and [[~id]] in the weblink's link field with no luck. [ed. note: yurkobb last edited this post 14 years, 6 months ago.]
          <em>The Earth is not the hell, and people aren't cursed, and joy in not a sin, but a gift of God.</em> (Lesia Ukrainka)
          • 813 ☆ A M B ☆
          • 326 Posts
          Sorry. Seems like a weird problem. I could've sworn getResources just handled weblinks correctly by default.
            • 33277
            • 35 Posts
            The same problem with changing the 'Resource Type' to symlink. Are they all a 'modResource' in $modx->getObject() or something else?

            EDIT: they are all 'modResources'. [ed. note: yurkobb last edited this post 14 years, 6 months ago.]
              <em>The Earth is not the hell, and people aren't cursed, and joy in not a sin, but a gift of God.</em> (Lesia Ukrainka)
              • 33277
              • 35 Posts
              My fault. I simply forgot to unset the &limit parameter: my new resource was out of reach of the query... Sorry for disturbing.
                <em>The Earth is not the hell, and people aren't cursed, and joy in not a sin, but a gift of God.</em> (Lesia Ukrainka)
                • 813 ☆ A M B ☆
                • 326 Posts
                No apologies necessary! We've all missed little stuff like that. Maybe someone else will have a similar problem and benefit from this post.