We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21417
    • 486 Posts
    Hello,

    I am using MODx 1.0.4 with Ditto 2.1 and building an intranet and wanting to setup an rss feed for the site.

    The content on the site is either a standard page, a pdf or a link.

    The pdfs and links are included on the parent pages with various menu calls and all have show in menu unchecked.

    Is it possible to include in the rss feed links to the closest "show in menu" parent page when a child document within that section has been updated?

    eg

    Consider the following hierachy

    + Parent (show in menu)
     - Category1 (show in menu)
      * Sub Category1 (show in menu)
       > a.pdf (hide in menu)
       > b.pdf (hide in menu)
      * Sub Category2 (hide in menu)
       ^ Super Sub Category1 (hide in menu)
         > linkC (hide in menu)
       > d.pdf (hide in menu)
     - Category2 (show in menu)
       > e.pdf (hide in menu)



    If a.pdf is updated, return a link to Sub Category1.
    If linkC is updated, return a link to Category1.
    If e.pdf is updated, return a link to Category2.

    My ditto call is:
    [!Ditto? &parents=`0` &depth=`0` &format=`rss` &summarize=`10` &total=`10` &showInMenuOnly=`1` &tpl=`rss-row` &orderBy=`editedon DESC, pagetitle DESC, menuindex DESC`!]


    My row template currently looks like so:
    <item>
    		<title>[+pagetitle+]</title>
    		<link>[(site_url)][~[+id+]~]</link>
    		<guid isPermaLink="false">[(site_url)][~[+id+]~]</guid>
    </item>
    



    If not....

    I have a wonderful PHx call that Bruno17 wrote for me that works in my normal ditto menus and gives the appropriate id:
    [+pdf:is=``:then=`[+url:isnot=``:then=`[+url+]`:else=`[~[+id+]~]`+]`:else=`[+pdf+]`+]

    I tried changing the row template to the following but nothing is returned:
    <item>
    		<title>[+pagetitle+]</title>
    		<link>[+pdf:is=``:then=`[+url:isnot=``:then=`[+url+]`:else=`[(site_url)][~[+id+]~]`+]`:else=`[+pdf+]`+]</link>
    		<guid isPermaLink="false">[+pdf:is=``:then=`[+url:isnot=``:then=`[+url+]`:else=`[(site_url)][~[+id+]~]`+]`:else=`[+pdf+]`+]</guid>
    </item>



    Any ideas?


    Also, is it possible to use the link attributes parameter for an rss feed? If so, what is the call and where do I put it?


    Thanks in advance.
      Web design Adelaide
      http://gocreate.com.au