We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12652
    • 228 Posts
    Trying to setup an XML/RSS feed, but noticed when looking at the feeds outside of the site, e.g., in iGoogle, the links within the posts that weren’t absolute to begin with, such as all internal site links, remained relative and became something like this:

    google.com/my/relative/link.htm

    The Ditto call is placed on a page named with an xml extension, blank template (empty causes .htm to be appended after the .xml), and type setup for text/xml.

    Here is the call:
    [!Ditto? &parents=`6` &depth=`5` &display=`5` &format=`rss` &tpl=`InstilleryRSS`!]


    Am I going to have to write out absolute URLs on all posts that will refer back to interior pages?
      | Identity Developments delivers SEO focused web design and web presence services
      - it's not about websites, it's about your identity. |
      • 10449
      • 956 Posts
      What does your InstilleryRSS chunk look like? I guess you can just modify this to include [(site_url)]
        • 12652
        • 228 Posts
        Yes, the main link is setup that way. But any links within the "post" that were created using the MODx linking based on ID within a post remain relative. So if you are syndicating a blog and link to previous posts, they’ll be relative to wherever the blog is being syndicated to.
          | Identity Developments delivers SEO focused web design and web presence services
          - it's not about websites, it's about your identity. |
          • 10449
          • 956 Posts
          Try to change the settings in

          Resources > Manage Resources > Plugins > TinyMCE
          Path Options = fullpathurl

          I’m not sure if this changes documents already created though... but worth a try.
            • 18397
            • 3,250 Posts
            Ditto 2.1 should automatically rewrite the relative URLs to absolute URLs in the content and introtext fields when using the RSS format.
              • 12652
              • 228 Posts
              Mark, that’s what I thought I had read.

              Take a look at this URL http://www.identitydevelopments.com/feeds/instillery.xml

              and especially look at the "local-focused tips" link in the Holiday post and the "reputation management" link in the last post. Both of those refer to other pages on the site which have been linked to through using the ID linking. While they appear fine on the page, if you subscribe to the feed and then view off-site, they remain relative links.
                | Identity Developments delivers SEO focused web design and web presence services
                - it's not about websites, it's about your identity. |
                • 18397
                • 3,250 Posts
                Can you post the contents of the InstilleryRSS chunk
                  • 12652
                  • 228 Posts
                  Here you go Mark,

                  <item>
                  <title>[+rss_pagetitle+]</title>
                  <link>[(site_url)][~[+id+]~]</link>
                  <description><![CDATA[ [+content+] ]]></description>
                  <pubDate>[+rss_date+]</pubDate>
                  <guid isPermaLink="false">[(site_url)][~[+id+]~]</guid>
                  <dc:creator>[(site_name)]</dc:creator>
                  [+tagLinks+]
                  </item> 
                    | Identity Developments delivers SEO focused web design and web presence services
                    - it&#39;s not about websites, it&#39;s about your identity. |
                    • 18397
                    • 3,250 Posts
                    Two things:
                    1. Do things work without the custom template?
                    2. If so, try removing the ifs around these statements in the main ditto class (for testing)
                    		if (in_array("content",$this->fields["display"]["db"]) && $this->format != "html") {
                    			$resource['content'] = $this->relToAbs($resource['content'], $modx->config['site_url']);
                    		}
                    		
                    		if (in_array("introtext",$this->fields["display"]["db"]) && $this->format != "html") {
                    			$resource['introtext'] = $this->relToAbs($resource['introtext'], $modx->config['site_url']);
                    		}
                    
                      • 12652
                      • 228 Posts
                      Mark,

                      Well it renders with or without the tpl, but hard to say whether removing the if’s work or not... doesn’t seem to matter in iGoogle, but then when I tried it in NetVibes, it seemed to be absolute URLs, but when I restored the ditto class and then when I put the tpl back in place, it seemed to work on NetVibes either way. So maybe it has something to do with iGoogle then.

                      -- actually, I take that back... still not sure... NetVibes was based on my domain, but the URL was to the feed URL rather than the absolute root domain.
                        | Identity Developments delivers SEO focused web design and web presence services
                        - it&#39;s not about websites, it&#39;s about your identity. |