We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37131
    • 111 Posts
    I mean - how Articles generates list of articles filtered by a tag? I still can't get it to work, but I suppose that Articles displays list using the same template and configuration as for regular (all) articles. But how it is done if Articles does not use getResourcesTag ?
    [Edit], after a bit digging i've solved it by myself. [ed. note: khyrlik last edited this post 12 years, 1 month ago.]
      ---
      Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding
      • 37131
      • 111 Posts
      I've managed to fix tags, at least for non-friendly URLs. But a little intermission:
      Digging inside and hacking code is not what I love to do as web developer. I wish people with good knowledge of how MODx and it's modules work could help a little more. For them it would take probably few minutes, for me it takes days learning many things how MODx works. sad
      Rant off.
      To get things working I have changed toLinks call in Article Row Template (default is sample.ArticleRowTpl), where tags are displayed for each post (line 3), from:
      <p class="post-info">...... &useTagsFurl=`1` ]]</span>`]]</p>

      to:
      <p class="post-info">....... &tagKey=`articlestags` &useTagsFurl=`[[++friendly_urls]]` ]]</span>`]]</p>


      This fixes tags links under title in each article.
      To get tag links in Tag placeholder I had to hack articles code in articlescontainer.class.php, change line 380 as below:
      &useTagFurl=`'.$this->xpdo->getOption('friendly_urls', null, false). '`
      

      Now it works much better and correctly to whatever FURL settings you choose but still doesn't work when you use it with FURL On. I don't know yet how FURLs work in MODx so no solution for now.

      Anyway, I think Articles makes bad FURL paths for tags. FURL link to article post looks like http://aaa.com/news/2012/03/18 (news is my alias of Article container), when link to tags looks like http://aaa.com/articletags/products (missing 'news' and will make problems with more than one Article container). Or some of my settings in MODx are bad, don't know.

      Update:
      I've removed line with furlKey from solution, it din't help when using FURLs, problem lies elsewhere. [ed. note: khyrlik last edited this post 12 years, 1 month ago.]
        ---
        Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding
        • 37131
        • 111 Posts
        FURL mode investigation update.
        I've figured out that manual links in format http://YourDomain/YourArticlesAlias/tags/something works. So 'tags' instead of 'articlestags' in non-FURL mode. IMHO I would prefer more 'tags' as i tells less about site structure. Still don't know how arguments are passed and how to make Articles add YourArticlesAlias to tag links.
          ---
          Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding
          • 37131
          • 111 Posts
          When FURL On tagLister does not add Article container alias. This is either tagLister bug or MODX's makeURL bug, it depends on how MODx works internally, either way I've filed out bug issuer to tracker, so it will be fixed by somebody
          somehow
          sameday
            ---
            Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding
            • 37131
            • 111 Posts
            PS.
            To make Archives work in non FURL mode, change 0 to 1 at the end of line 359 in file articlescontainer.class.php:
            &useFurls=`'.$this->xpdo->getOption('archiveWithFurls',$settings,1).'`

            this file is located in core/components/articles/model/articles
            It couldn't find where this settings is located, but since changing default value works, it isn't defined anywhere.
              ---
              Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding
              • 37131
              • 111 Posts
              Articles 1.5 update:

              Fixes for tags are still needed, it wasn't fixed (now line number in articlescontainer.class.php is 385)

              [UPDATED] As for fixing Archives, now the opposite option works correctly in non-FURL mode (change 1 to 0 at the end of line 364). Change line 364 from:
              &useFurls=`'.$this->xpdo->getOption('archiveWithFurls',$settings,1).'`

              To
              &useFurls=`'.$this->xpdo->getOption('archiveWithFurls', $settings, $this->xpdo->getOption('friendly_urls', null, false)).'`
              


              MODX 2.2.1 + Articles 1.5
              FURL Mode still doesn't work with Articles 1.5, but instead of redirecting to Resorce with id=0 it shows 404.
              Direct URL link entered in address (www.mysite.com/news/tags/products) which worked before doesn't work now. [ed. note: khyrlik last edited this post 12 years, 1 month ago.]
                ---
                Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding
                • 34459
                • 134 Posts
                @khyrlik
                I've got the same thing...also my layout broke God knows why...I’m definitely staying for now with modx 2.2.0 and 1.4.7.
                Also if you install a fresh 2.2.0 it would download automatically 1.5 which is incompatible. You have to download 1.4.7 manually.
                  Check out blackflow.pl