New Community Forums are coming. Watch this space for news.
Subscribe: RSS
  • Hi there,

    Under Advanced Settings/Tagging there is this field called "Tag Listing Chunk", where you can set your own custom chunk. I've tried that and it doesn't work. Output is still the default one. Is this feature broken or have I got this all wrong?

    Help appreciated
    • Anyone?
      • Very good question.
        • I've run into this same problem. I've posted a separate discussion about my troubles, no replies. I just figured out how I can solve my issue with the urls that are being generated. It requires me to make a custom the Chunk.

          I create the chunk but it still uses the default.
          • Wouah... 6 years old topic and still no issue ?
            I just have installed Articles on MODX 2.7.0 and there is still no tag chunk !
            • Here's the code that's supposed to use a custom setting for the tag Tpl:

              public function getTagListerCall($placeholderPrefix = '') {
                $settings = $this->getContainerSettings();
                $output = '[[tagLister?
                    &tpl=`'.$this->xpdo->getOption('tplTagRow',$settings,'tag').'`
                    &tv=`articlestags`
                    &parents=`'.$this->get('id').'`
                    &tvDelimiter=`,`
                    &useTagFurl=`'.$this->xpdo->getOption('friendly_urls', null, false). '`
                    &limit=`'.$this->xpdo->getOption('tagsLimit',$settings,10).'`
                    &cls=`'.$this->xpdo->getOption('tagsCls',$settings,'tl-tag').'`
                    &altCls=`'.$this->xpdo->getOption('tagsAltCls',$settings,'tl-tag-alt').'`
                    &target=`'.$this->get('id').'`
                ]]';
              $this->xpdo->setPlaceholder($placeholderPrefix.'tags',$output);
              return $output;
                  }


              The getOption() call gets the TplTagRow from the settings. Via setPlaceholder, the whole taglister tag replaces the
              [[+tags]] placeholder with the tpl property set to the name of the custom tag chunk.

              The default chunk is in core/components/taglister/elements/chunks/tag.chunk.tpl. It's not in the Elements tree as far as I can tell.

              The default chunk is:

              <li class="[[+cls]]"><a href="[[+url]]">[[+tag]]</a> ([[+count]])</li>


              Here's what I'd suggest trying. Create a chunk called myTagRowTpl with this code:

              <li class="[[+cls]]"><a href="[[+url]]">[[+tag]]</a> XXX ([[+count]])</li>

              Put myTagRowTpl in that advanced setting (in place of "tag"). Clear the site cache (you may also need to clear your browser cache). See if XXX shows up in the tag listing. If it doesn't, that setting is truly ignored. If it does, it's used, and you can modify myTagRowTpl to fit your needs.
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/MODx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting