Skip to content
This repository has been archived by the owner on Jan 22, 2018. It is now read-only.

OpenBuildings/jam-generated-feed

Repository files navigation

Jam Generated Feed Module

Build Status Coverage Status Latest Stable Version

A module to generate xml files based on a jam collection with a minion task

Usage

You need to add configuration to config/jam-generated-feed.php file:

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',
	),
);

Using The Task

minion feed:generate --name=products-uk

Generating {"model":"product","filter":"feed_products_uk","view":"feeds\/products-uk","file":"feeds/products-uk.xml","name":"products-uk"}
Done.
Saving feed content to DOCROOT/test_file.xml
Done.

License

Copyright (c) 2012-2013, OpenBuildings Ltd. Developed by Ivan Kerin as part of clippings.com

Under BSD-3-Clause license, read LICENSE file.