我正在建立一个在网上报纸上写文章的后端管理员,我需要插入图片(1对n关系)。事实上,我写了一个表单来处理要显示的字段,这很好。
现在我想添加一个分部,它将显示已经链接到文章的图像,所以我有一个组件类,其中包含一个操作executeShowImages和一个模板_showImages.php。
My question I would to keep all the definition in the form class, but just add this component/partial display and I cannot do it easily. Here is my generator file:
generator:
class: sfPropelGenerator
param:
model_class: article
theme: admin
non_verbose_templates: true
with_show: false
singular: article
plural: articles
route_prefix: article
with_propel_route: 1
actions_base_class: sfActions
config:
actions: ~
fields: ~
list: ~
filter: ~
form:
class: ArticleFormBackend
display: [ ~showImages ]
edit: ~
new: ~
如果以这种方式执行,则只显示showImage组件。怎么能做到?
非常感谢你的帮助