We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    I had the oddest thing happen, and it took me a few minutes to figure out what was going on! I had created some articles, and was using the NewsListing snippet to display the latest full article on the home page. I was using [*longtitle*] at the beginning of the articles, and the longtitle of the home page was appearing!

    This is totally understandable, but it shouldn’t be that way. I’m not sure what it would take to make NewsListing respect the source of any document variables like that, or if it’s even possible.
      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
      • 25663 MODX Staff
      • 12,272 Posts
      I don’t think that’s understandable at all... down right weird, even!
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 18397
        • 3,250 Posts
        Are you saying you have [*longtitle*] in the content of each article? If so, NewsListing does nothing about it and the parser executes it with the current page. I can add a line to replace all [*tags*] with their correct values if you wish?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          That is correct, in the individual news documents I used <h1>[*longtitle*]</h1> for a heading. Since the articles was actually being displayed on the home page, it was inserting the home page longtitle instead of the news document’s longtitle. It probably shouldn’t do that; one would expect to be able to use the document tags in the article.
            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
            • 18397
            • 3,250 Posts
            Susan here is a quick fix:

            Replace:

            		foreach ($resource[$x] as $docVar => $docVarValue) {
            			$placeholders["[+$docVar+]"] = "$docVarValue";
            


            with:

            		foreach ($resource[$x] as $docVar => $docVarValue) {
            			$placeholders["[+$docVar+]"] = "$docVarValue";
            			$placeholders["[*$docVar*]"] = "$docVarValue";
            
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Nope. Still showing the host document’s longtitle.
                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
                • 18397
                • 3,250 Posts
                Sorry, forgot that the [*longtitle*] is actually in the content field...

                Please try the attached PRE-RELEASE version. In my tests this seemed to fix the issue.

                David --- I’m still working on an elegant solution to the checkbox dillema (I’ve got an "uguly" one if you need it ASAP).
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Yes, that took care of the doc variable issue. Thanks!
                    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
                    • 6726
                    • 7,075 Posts
                    Quote from: Mark at Feb 02, 2006, 12:19 AM
                    David --- I’m still working on an elegant solution to the checkbox dillema (I’ve got an "uguly" one if you need it ASAP).

                    If you have the ugly one at hand, yes please I could use it smiley

                    If it’s not copy->paste->send thing and takes time to do, I’ll wait for the release then. Thanks Mark !
                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l&#39;outil id
                      • 2762
                      • 1,198 Posts
                      Great works Mark ! smiley

                      ps:

                      In version 6.5 there is again
                      <?
                      
                      
                        Free MODx Graphic resources and Templates www.tattoocms.it
                        -----------------------------------------------------

                        MODx IT  www.modx.it
                        -----------------------------------------------------

                        bubuna.com - Web & Multimedia Design