When creating a new DataObjectSet, things like FirstParagraph and LimitWordCount don't seem to work with the data from the new Object.
In short, I'm trying to get an object, manipulate the data, create a new object and send that along to the templates.
public function getProducts() {
$products = DataObject::get("Product", "ProductFeature", "", "", "");
$ProductsDataObject = new DataObjectSet();
$multiarray = array();
foreach($products as $product) {
$prodtitle = $product->MenuTitle;
$prodcontent = $product->Content;
...Some other code here...
$proddata = array(
"prodtitle"=>$prodtitle,
"prodcontent"=>$prodcontent,
...other array data here...
);
array_push($multiarray, $proddata);
$ProductsDataObject->push(new ArrayData($proddata));
}
return $ProductsDataObject;
}
In my templates control loop I'm using $prodcontent.FirstParagraph, but getting nothing.
--
Chris