7911 Posts in 1354 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Preview: DataObjectManager module
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 54213 Views |
-
Re: Preview: DataObjectManager module

23 March 2009 at 10:55pm
Not sure if this has been posted but here is the link to the module on the unsuported modules page http://silverstripe.org/dataobjectmanager-module/
-
Re: Preview: DataObjectManager module

23 March 2009 at 11:57pm
There is a "small bug" behind the links on page navigation for lists. The parameters of First, Next, Previous an Last are twice in parameter string.
admin/EditForm/field/Products?ctf[Products][per_page]=10&ctf[Products][showall]=0&ctf[Products][sort]=SortOrder&ctf[Products][sort_dir]=DESC&ctf[Products][search]=&ctf[Products][filter]=&ctf[Products][start]=10&ctf[Products][per_page]=10&ctf[Products][showall]=0&ctf[Products][sort]=SortOrder&ctf[Products][sort_dir]=DESC&ctf[Products][search]=&ctf[Products][filter]=
-
Re: Preview: DataObjectManager module

24 March 2009 at 2:36am
Hey! Look at that! It got posted. Finally. Still waiting for the ImageGallery to get some love.
@hu - Thanks for the heads up. I'll look at that.
-
Re: Preview: DataObjectManager module

24 March 2009 at 5:16am
Uncle Cheese,
I think I'm missing something. I'm setting setParentClass('Page') on the FileDataObjectManager instance, yet PDFResource's PageID column stays set at 0. Any clues?
Ben
-
Re: Preview: DataObjectManager module

24 March 2009 at 5:27am
Sure thing.
class QualityChildPage extends Page {
static $db = array('Category' => "Enum('Links, Workplace, Family, Stories, Extras','Links')");
static $default_parent = 'QualityHomePage';
static $can_be_root = false;
static $allowed_children = array();
static $icon = "themes/memberscf/images/pageicons/cqarticle";function getCMSFields() {
$fields = parent::getCMSFields();$fields->addFieldToTab('Root.Content.Metadata', new DropdownField('Category', 'Category', singleton('QualityChildPage')->dbObject('Category')->enumValues()));
return $fields;
}
function Quality() {
return $this->Parent()->Quality;
}
}class QualityChildPage_Controller extends Page_Controller {
protected $sidebar = 'QualitySideBar';public function CategoryLinks($category) {
return QualityHelper::CategoryLinks($category, $this->Parent());
}
}class QualityHelper {
public static function CategoryLinks($category, $quality) {
$results = new DataObjectSet();
foreach($quality->Children() as $child) {
if ($child->Category != $category) continue;
$results->push($child);
}return $results;
}
} -
Re: Preview: DataObjectManager module

24 March 2009 at 3:13pm
Hi,
I was justing try to use the setPageSize() method and it doesn't seem to be working. I can get to it work by changing the line
protected $per_page = "5";
Cheers
Robin
-
Re: Preview: DataObjectManager module

24 March 2009 at 3:52pm
That's because the page size is set in the UI in the bottom right. By changing the property per_page, you're setting the default value to that dropdown.
| 54213 Views | ||
| Go to Top | Next > |



