We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18397
    • 3,250 Posts
    What is your current Ditto call?
      • 29802
      • 36 Posts
      Hi Mark - Here is the call:

      [!Ditto? &startID=`2` &format=`rss` &tpl=`ditto-rss-tpl` &charset=`UTF-8` &tagData=`myTags` &tagDelimiter=`,` &summarize=`20` &total=`20` &commentschunk=`Comments`!]
        • 18397
        • 3,250 Posts
        It seems there was a bug in the tagging extender when dealing with a non-default tagDelmiter and RSS Feeds. The change is as follows (or you can download the development version):
        Index: /trunk/assets/snippets/ditto/extenders/tagging.extender.inc.php
        ===================================================================
        --- /trunk/assets/snippets/ditto/extenders/tagging.extender.inc.php (revision 1451)
        +++ /trunk/assets/snippets/ditto/extenders/tagging.extender.inc.php (revision 1456)
        @@ -318,5 +318,6 @@
         					$tagDocID = (!$tagID) ? $modx->documentObject['id'] : $tagID;
         					$url = ditto::buildURL("tags=$tag&start=0",$tagDocID);
        -					$output .= template::replace(array('url'=>$url,'tag'=>$tag),$tpl).$this->displayDelimiter;
        +					$output .= template::replace(array('url'=>$url,'tag'=>$tag),$tpl);
        +					$output .= ($format != "rss" && $format != "xml" && $format != "atom") ? $this->displayDelimiter : '';
         				}			
         			} else if ($format != "rss" && $format != "xml" && $format != "atom" && $this->displayMode == 2) {
        @@ -330,5 +331,5 @@
         			}
         			
        -			return ($format == "rss" || $format == "xml" || $format == "atom") ? $output : substr($output,0,-1*strlen($this->displayDelimiter));
        +			return ($format != "rss" && $format != "xml" && $format != "atom") ? substr($output,0,-1*strlen($this->displayDelimiter)) : $output;
         		}
         	}
        
          • 29802
          • 36 Posts
          Mark - Well done, thank you for that. laugh

          Now... tongue

          Just one one issue remaining in the RSS header - Note the "description" tag:

          <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
          - <channel>
            <title>Energy Performance Certificates</title> 
            <link>http://www.energy-performance-certificates.org/feed</link> 
            <description /> 
            <language>en</language> 


            • 18397
            • 3,250 Posts
            Do you have the description set for that document?
              • 29802
              • 36 Posts
              Yes, good point - I’m a bit confused now due to not remembering if the <link> tag originally contained the (RSS) feed URL or the home page URL... Clearly, there wouldn’t be a description on the feed URL.

              OK, sorry about that - Unless anyone thinks it contravenes any specs, consider this closed and many thanks for your swift attention to this Mark, much appreciated laugh
                • 18397
                • 3,250 Posts
                According to the RSS 2 specifications, the <description> and <link> tags in the RSS header reflect the feed itself.
                  • 29802
                  • 36 Posts
                  Ah... well now you’ve prompted me to look - purely out of interest, you understand - and I just found the following:

                  link - The URL to the HTML website corresponding to the channel. [Example]: http://www.goupstate.com/
                  description - Phrase or sentence describing the channel. [Example]: The latest news from GoUpstate.com, a Spartanburg Herald-Journal Web site.

                  From: http://cyber.law.harvard.edu/rss/rss.html

                  I also just took a peek at a wordpress feed and noticed the <link> tag pointing to the home page too.

                  I don’t follow the RSS specs personally so make of it what you will.

                  PS... Can the RSS header portion be templated in ModX perchance?