PHP code example of openbuildings / jam-generated-feed
1. Go to this page and download the library: Download openbuildings/jam-generated-feed library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
openbuildings / jam-generated-feed example snippets
return array(
// Each key is a "name" of the feed, will be used when generating a new one
'products-uk' => array(
// Jam model for the collection
'model' => 'product'
// Optional filter that will be applied to the collection (in the form of $collection->{$filter_name}())
'filter' => 'feed_products_uk',
// What view to use to generate the feed. It would be passed a $collection variable with the Jam Collection
'view' => 'feeds/products-uk',
// Where to output the file, prepends DOCROOT, overwrites
'file' => 'feeds/products-uk.xml',
),
);