With Feeds you can create three separate types of XML content:

  • Basic XML
  • RSS 0.91 formatted XML
  • RSS 2.0 formatted XML

Feeds are all served through /feeds/ route of your website. If you have static content in a folder in /site/feeds/ it can interfere with Feeds functioning.

Properties

  • Name — For Basic XML, this property is simply for keeping track of your feeds in the admin. For RSS formatted XML, this will be your <title> tag unless you specify a different one in your feed's options.
  • Description — For Basic XML, this property is not used. For RSS formatted XML, this will be your <description> tag.
  • Data Table — The MySQL table to pull feed items from.
  • Type — The type of feed to create. Custom is basic XML with <item> tags for each feed entry. RSS types adhere more strictly to their respective formats (and require you to edit the field's options using the icon)

Fields

After choosing a Data Table your feed will be populated with fields for each column in the database (including reserved columns). If you have chosen RSS 0.91 or RSS 2.0 as your Type, the Fields section will not show up. You must edit the feed's options to designate each column to the proper RSS tag.

Parsers

Parsers allow you to run PHP code in order to translate the data from your table into more presentable content for your feed. You enter vanilla PHP code to transform the $value variable into what you want stored in the cache for your user to see. In the example below we're going to transform a JSON encoded column in the database into something more presentable:

$data = json_decode($value);
$value = $data->firstName." ".$data->lastName;

In BigTree 4.1 you are in a distinct function scope and have $value for the column that the parser is being run on and $item for the rest of the columns. Only $value will be returned and modified. In BigTree 4.0, parsers run in a higher scope and can potentially break the caching process.