21309 Posts in 5738 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 686 Views |
-
predefine page field

15 October 2010 at 8:38am
Hi,
I didn't really know how to name the topic. That's probably also the reason why I haven't found answer, so if that was already answerd, sorry for another post.
My point is. I would like to create page field (like author in news or place in calendar) but as a drop down list. But the elements of the list should be taken from table and this table should be avaliable to back-end user.
I need to let article editor to choose place where ceratin event is happening from avaliable locations. He also should be able to add or delete those locations in easy way (best solution would be table just like users, editable from cms).
Sorry if my english isn't the best.
-
Re: predefine page field

15 October 2010 at 6:57pm
You could try a HasOneDataObjectManager http://doc.silverstripe.org/modules:dataobjectmanager#relation_dataobjectmanagers or use HasOneComplexTableField out of the box, I think you would have to define Location as a data object type with a has many relation to your pagetype first and define your pagetype as having a has one relation to Location.
More on that: http://doc.silverstripe.org/tutorial:5-dataobject-relationship-management
| 686 Views | ||
|
Page:
1
|
Go to Top |


