We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33968
    • 863 Posts
    The second one, I’m trying to get exactly the same information but it will be displayed on the home page at root level. I thought this would be fairly simple but not having much luck!
      • 36926
      • 701 Posts
      Quote from: lucas at Jul 14, 2010, 03:03 PM

      The second one, I’m trying to get exactly the same information but it will be displayed on the home page at root level. I thought this would be fairly simple but not having much luck!


      Note sure if this will work but how about having a TV that contains the getField and then in the ditto call reference that TV. So [+myTV+]
        • 33968
        • 863 Posts
        Not sure about that but I had to go with a different approach in the end. Thanks anyway wink
          • 12422
          • 29 Posts
          Is it possible to return all TV-values for a parent ID?

          I am using TvTagCloud, and my client want’s to list all tags entered in the TV on all sites.

          Thanks in advance!
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            If you mean to retrieve all the TV values for all the resources under the given parent, you could use Ditto with a simple tpl to just return the tv. Ditto doesn’t have to return content and links, it will return whatever you specify in its tpl.
            <li>[+tvname+]</li>

            would simply create a list of the tv values for the resources.
              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
              • 10449
              • 956 Posts
              With TvTagCloud, you’d use a snippet call like this:

              [!TvTagCloud? &parent=`15` &landing=`123` &tvTags=`documentTags` &showCount=`1` &displayType=`cloud`!]

              The parameters are described in the snippet itself, and also here: http://modxcms.com/extras/package/?package=473

              Or is this not what you’re looking for?
                • 36926
                • 701 Posts
                Quote from: lucas at Jul 16, 2010, 09:47 AM

                Not sure about that but I had to go with a different approach in the end. Thanks anyway wink

                Out of interest what approach did you use if you don’t mind sharing, it may help others.

                Ben
                  • 12288
                  • 12 Posts
                  Hi!
                  I’m stuck with using GetField with MaxiGallery. The call for MG is
                  <div class="img">[[MaxiGallery? &childgalleries_ids=`all` &display=`childgalleries` &childgalleries_order_by=`parent, menuindex, description` &pics_per_page=`1`&pics_per_row=`5` &childgalleryTpl=`galeriiTpl`]]</div>

                  This sorting galleries by parent ID first. But I need them to be sorted by parent menuindex. So I tried by

                  <div class="img">[[MaxiGallery? &childgalleries_ids=`all` &display=`childgalleries` &childgalleries_order_by=`[!getField? &parent=`1` &field=`menuindex`!], menuindex, description` &pics_per_page=`1`&pics_per_row=`5` &childgalleryTpl=`galeriiTpl`]]</div>


                  Result is wrong. How should I use the snippet to get it right?

                    • 7327
                    • 195 Posts
                    Is there a way to access TVs that are within protected pages without having a user belonging to the webgroup that’s the same as the protected pages log in? For example, I’m trying to retrieve a thumbnail TV which is set in the protected page for the home page.
                      • 3544
                      • 9 Posts
                      Please pardon me if I’m wrong, but I have met a bug while using a custom snippet, that mentions getField is needed, wich I suspect may be caused by getField.
                      When I try to get a text containing special html-chars from a placeholder, both a as clean chars (utf-8) or as html special chars, the text is being cut at the special char, and the remainder disappears.
                      I discovered this when a text containg a special character was amputated at the point where the character appeared, but it also happens on taged common chars such as copy; &lt; etc.

                      Is it getField that causes this?

                      System Info
                      Server
                      MODx version 1.0.5
                      Release date Jan 19, 2011
                      phpInfo() View
                      Access permissions Enabled
                      Server Time 11:36:25
                      Local Time 11:36:25
                      Server offset 0 h
                      Database name modx2
                      Database server xxx
                      Database Version 5.5.9
                      Database Charset latin1
                      Database Collation Charset latin1_swedish_ci
                      Table prefix modx2_
                      MODX_BASE_PATH D:/xxx
                      MODX_BASE_URL /
                      MODX_MANAGER_URL http://xxx/manager/
                      MODX_MANAGER_PATH D:/xxx/manager/
                      MODX_SITE_URL http://xxx/

                      PHP Version 5.3.6
                      System Windows NT WEBSERVER 5.2 build 3790 (Windows Server 2003 Standard Edition Service Pack 2) i586
                      Build Date Mar 17 2011 10:46:06
                      Compiler MSVC9 (Visual C++ 2008)