<?php
/**
 * Component file
 * component:  com_flexicontent
 * type:       category
 *
 * @package     Add to Menu
 * @version     1.2.4
 *
 * @author      Peter van Westen <peter@nonumber.nl>
 * @link        http://www.nonumber.nl
 * @copyright   Copyright (C) 2010 NoNumber! All Rights Reserved
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

$component = array(
	/* Name
	 * This is the name of the menu item type
	 */
	'name' => 'FLEXIcontent category',

	/* Adjust height
	 * If for some reason the height of the popup window is
	 * not big enough (or too big), you can adjust it
	 * (negative values are also permitted)
	 */
	'adjust_height' => 0,

	/* Requirements (get/post variables)
	 * -> Use '*' to match anything but empty
 	 * -> Use '+' to match anything but false (empty/0/false)
 	 * -> Use arrays to match any of multiple values
	 */
	'required' => array(
		'view' 	=> 'category',
		'cid' 	=> '*',
	),

	/* Dabase select
	 * Define what options to use to select the unique item
	 * You have to define table, where, name and alias
	 * If no db lookup is required, only define name (and alias)
	 * -> Use '$...' to use available variables
	 */
	'dbselect' => array(
		'table' => '#__categories',
		'where' => array(
			'id' => '$cid'
		),
		'name' => 'title',
		'alias' => 'alias',
	),

	/* Extra select options
	 * Define what extra options to display
	 * Choose from:
	 * text, textarea, radio, select, hidden
	 * -> Use '$...' to use available variables
	 */
	'extra' => array(
		array(
			'type' 	=> 'select',
			'label' => 'FLEXI_ITEM_DEPTH',
			'name' 	=> 'item_depth',
			'value' => array(
				'0' => 'FLEXI_ROOT',
                '1' => 'FLEXI_LEVEL_1',
                '2' => 'FLEXI_LEVEL_2',
                '3' => 'FLEXI_LEVEL_3',
                '4' => 'FLEXI_LEVEL_4',
                '5' => 'FLEXI_LEVEL_5',
			),
		),
		array(
			'type' 	=> 'select',
			'label' => 'FLEXI_ADD_ITEM_PATHWAY',
			'name' 	=> 'add_item_pathway',
			'value' => array(
                '1' => 'FLEXI_YES',
				'0' => 'FLEXI_NO',
			),
		),
	),

	/* URL params
	 * Define what the menu item url should contain
	 * -> Use '$...' to use available variables
	 */
	'urlparams' => array(
		'option'	=> 'com_flexicontent',
		'view' 		=> 'category',
		'cid' 		=> '$cid',
	),

	/* Menu item params
	 * Define what the extra menu item params
	 * -> Use '$...' to use available variables
	 */
	'menuparams' => array(
		'item_depth' 		=> '$item_depth',
		'add_item_pathway' 	=> '$add_item_pathway',
	),
);