3064 Posts in 865 Topics by 647 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1223 Views |
-
has_many Files and AssetTableField

2 March 2010 at 12:09am
Hi!
I am trying to use the AssetTableField for linking multiple files to a page, but the selection in AssetTableField does not get saved. Did I miss some point? Any hint is highly appreciated.
Thanks!
<?php
class ContentPage extends Page {
// database relations
public static $db = array(
);
public static $has_one = array(
);
public static $has_many = array(
'Files' => 'File'
);// fields in CMS
function getCMSFields() {
$fields = parent::getCMSFields();
$downloadsTable = new AssetTableField(
$this,
'Files',
'File',
array(
'Title' => 'Bezeichnung',
'Filename' => 'Dateiname'
)
);
$fields->addFieldToTab('Root.Content.Downloads', $downloadsTable);
return $fields;
}
}
?> -
Re: has_many Files and AssetTableField

11 April 2010 at 5:04am
Same problem here, can't anybody help with this?
-
Re: has_many Files and AssetTableField

23 April 2010 at 2:16am
I my experience the DataObjectManager module (which includes FileObjectManager) is generally an easier and nicer way to do these sorts of things. Take a look on the modules page for it - there are some good tutorials and a specific area on the forum.
| 1223 Views | ||
|
Page:
1
|
Go to Top |

