Jump to:

22977 Posts in 11806 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » predefine page field

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 762 Views
  • baniakjr
    Avatar
    Community Member
    4 Posts

    predefine page field Link to this post

    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.

  • JonoM
    Avatar
    Community Member
    103 Posts

    Re: predefine page field Link to this post

    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

  • baniakjr
    Avatar
    Community Member
    4 Posts

    Re: predefine page field Link to this post

    Thank you, that was most helpful.

    762 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.