I have the following GamesPage...
1. How can i make the Tags display like on the Blog? When you put a comma between them that they are seperated? And that you can click them? I guess i need a GamesTagesPage for this but how do i do this?
2. Category, i want this to be a fixed selection (like: category 1, category 2, category 3) how do i do this?
<?php
/**
* Defines the GamesPage page type
*/
class GamesPage extends Page {
static $db = array(
'Category' => 'Text',
'Tags' => 'Text',
'Description' => 'Text',
'Instructions' => 'Text'
);
static $has_one = array(
'Photo' => 'Image'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new Textfield('Category'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Tags'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Description'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Instructions'), 'Content');
$fields->addFieldToTab('Root.Content.Images', new ImageField('Photo'));
return $fields;
}
static $icon = "themes/Vista/images/treeicons/games";
static $defaults = array(
'ProvideComments' => true
);
}
class GamesPage_Controller extends Page_Controller {
}
?>