嵌入形式与学说的关系
我目前使用 ahDoctrineEasyEmbeddedRelationsPlugin 将块表单嵌入到页面表单中。
一切正常,但我想隐藏嵌入关系的标签。
我在管理员的页面表单中创建了一个“homepage-main-top”块,现在编辑此页面时,我现在看到“homepage-main-top”随机出现在嵌入块关系之前
查看插件文档,似乎没有任何与删除/隐藏此相关的内容:
http://imageshack.us/photo/my-images/197/relation.png
有谁知道如何不显示这个?
谢谢
I currently using ahDoctrineEasyEmbeddedRelationsPlugin to embed a Block form into a Page form.
All works well, but I'd like to hide the label of the embeddedRelation.
I've created a 'homepage-main-top' Block within the Page form in the admin, now when editting this Page, I now see 'homepage-main-top' is randomly appearing before the embedded block relation
Looking at the plugin docs, there doesn't seem to be anything relating to removing/hiding this:
http://imageshack.us/photo/my-images/197/relation.png
Does anyone know how to not display this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我一直在努力解决同样的问题,只是我需要设置标签的样式而不是隐藏/剥离它。
据我所知,没有简单的方法来操作嵌入表单的标签,但我想到了以下“黑客”。
embedRelation 方法接受内部和外部装饰器参数。您可以使用它们在标签和嵌入表单周围包裹额外的标记。然后,您可以使用 CSS 来隐藏使用特定 id/css 类的标签。
通过在外部装饰器中打开标签并在内部装饰器中关闭它们,您可以将标签包装在标签中(在两者之间呈现)。确保 HTML 仍然有效有点棘手。
我知道这是一个蹩脚的解决方案,但到目前为止我还没有找到更好的方法。
I've been struggeling with somewhat the same problem, only I needed to style the label instead of hidding / stripping it.
From what I've found out there is no simple way to manipulate the label of the embedded form, but I figured the following 'hack'.
The embedRelation method accepts a inner- and outer-decorator parameter. You can use these to wrap extra markup around the label and the embedded form. You can then use CSS to hide the label using a specific id / css class.
By openning tags in the outerdecorator and closing them in the inner decorator you can wrap the label in a tag (which is rendered inbetween the two). It is kind of tricky to make sure your HTML is still valid.
I know this is kind of a crappy solution but I haven't found a better way up until now.
将此行添加到您的父表单中:
如果上述方法不起作用,请尝试使用“newFormLabel”选项(来自插件的文档)。
Add this line to your parent form:
If the above doesn't work, try using the 'newFormLabel' option (from the plugin's documentation).