I want a template named PreviewIndex.ss to place ALL the values from ALL 'PortfolioIdentity' pages on it.
What should I put in PreviewIndex.ss and PreviewIndex.php to get all the data from PortfolioIdentity?
<?php
/// PortfolioIdentity.php
class PortfolioIdentity extends Page {
static $db = array(
'ItemTitle' => 'Text',
'ItemSummary' => 'Text'
);
static $has_one = array(
'Icon' => 'Image'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.PortfolioIndex", new ImageField('Icon','Item Icon'));
$fields->addFieldToTab("Root.Content.PortfolioIndex", new TextField('ItemTitle','Item Title'));
$fields->addFieldToTab("Root.Content.PortfolioIndex", new TextField('ItemSummary','Item Summary'));
return $fields;
}
}
class PortfolioIdentity_Controller extends Page_Controller {
}
?>