Silverstripe 数据对象和多页表单
Silver Stripe dataObject and multipage form
我需要帮助思考如何在 Silverstripe 中完成一个系统。
有一个页面可供授权用户管理档案。这不在 cms 中。它是一个前端系统。
我需要能够引导用户创建以下内容:
1. Archive (it has a year and title)
2. every archive can have many sections with (title, description)
3. every section can have many items with (photo, description)
我可以创建三个数据对象,但我不知道如何创建:
1. relate them using $many_many or $has_many
2. create a form for each step so the user can add the three different pieces.
直接 PHP/MySql 这很容易,但 Silverstripe 对我来说是新手。我不需要代码本身,只需要解释各个部分如何协同工作以获得我想要的东西。 silverstripe.org
上的文档和论坛很少
为了理解数据模型,最好完成课程/阅读文档。
- http://www.silverstripe.org/learn/lessons
- https://docs.silverstripe.org/en/3.3/developer_guides/model/
- http://www.silverstrip.es/blog/diagram-of-relationships-in-silverstripe/
至于这个模块的多页表单...
... 非常适合您,因为它管理多个表单并临时存储所有数据,允许用户通过步骤来回移动,只有在最后一步确认所有内容时才是临时的实际使用一个函数处理的数据以创建所需的对象和关系。
此模块在 github 上有一个很棒的 README.md 并指导您很好地创建表单。
我需要帮助思考如何在 Silverstripe 中完成一个系统。
有一个页面可供授权用户管理档案。这不在 cms 中。它是一个前端系统。
我需要能够引导用户创建以下内容:
1. Archive (it has a year and title)
2. every archive can have many sections with (title, description)
3. every section can have many items with (photo, description)
我可以创建三个数据对象,但我不知道如何创建:
1. relate them using $many_many or $has_many
2. create a form for each step so the user can add the three different pieces.
直接 PHP/MySql 这很容易,但 Silverstripe 对我来说是新手。我不需要代码本身,只需要解释各个部分如何协同工作以获得我想要的东西。 silverstripe.org
上的文档和论坛很少为了理解数据模型,最好完成课程/阅读文档。
- http://www.silverstripe.org/learn/lessons
- https://docs.silverstripe.org/en/3.3/developer_guides/model/
- http://www.silverstrip.es/blog/diagram-of-relationships-in-silverstripe/
至于这个模块的多页表单...
... 非常适合您,因为它管理多个表单并临时存储所有数据,允许用户通过步骤来回移动,只有在最后一步确认所有内容时才是临时的实际使用一个函数处理的数据以创建所需的对象和关系。
此模块在 github 上有一个很棒的 README.md 并指导您很好地创建表单。