Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

Jump to:

1154 Posts in 324 Topics by 274 members

Data Model Questions

SilverStripe Forums » Data Model Questions » RSS feed on DataObjects

Page: 1
Go to End
Author Topic: RSS feed on DataObjects 488 Views
  • cliersch
    avatar
    Community Member
    75 posts

    RSS feed on DataObjects Link to this post

    Hi! The tutorial shows how to use the RSSFeed for Children of the site. I would like to have DataObjects as an RSS Feed. My Problem is, the RSSFeed needs to have a LINK but I'm not able to use $this->Link() for Objects. How can I a implement a Link method for my DataObjects to use the feed?

       function init() {
          RSSFeed::linkToFeed($this->Link() . "rss", "RSS feed of this blog");
          parent::init();
       }
       
       function rss() {
          $rss = new RSSFeed($this->MyDataObject(), $this->Link(), "My feed", "Example feed.", "Title", "Content", "Author");
          $rss->outputToBrowser();
       }

    Any idea?

  • howardgrigg
    avatar
    Community Member
    155 posts

    Re: RSS feed on DataObjects Link to this post

    Hey yea I would also like to do something like this, any ideas?

  • bartvanirsel
    avatar
    Community Member
    7 posts

    Re: RSS feed on DataObjects Link to this post

    Hi,

    I'm no expert but i think the link method in the data objects is used.

    So if you create a custom Link method in your Data Object this will override the parent and will
    also be used in the RSS feed.

  • howardgrigg
    avatar
    Community Member
    155 posts

    Re: RSS feed on DataObjects Link to this post

    You're right, I figured this out yesterday so can confirm that it works

    488 Views
Page: 1
Go to Top

Currently Online: zueri, benediktr, swaiba, Euphemismus, dendeffe

Welcome to our latest member: GreenWork

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.