Zend framework decorators question

孤街浪徒 提交于 2020-01-13 17:39:10

问题


I need to add some random html content with text before and after my input field.

I know I can use description decorator and set escape option to false - this way I can simply inject arbitrary html chunk as a decorator.

But this only accounts for 1 html chunk - I need a second one after input field. If I simply output description decorator again after input field - that will output the same description chucnk.

1) Is there a way to use description decorator multiple times with different content?

2) In label decorator - is there a way to use span tag instead of label tag?

3) Can I inject random html into HtmlTag decorator?

thanks!

update: i solved my problem by creating simple custom decorator that allows me inject random html anywhere. Still -if someone knows quick and easy answers - plz post.


回答1:


You could check out the AnyMarkup decorator:

http://www.zfsnippets.com/snippets/view/id/62/anymarkup-decorator



来源:https://stackoverflow.com/questions/5213287/zend-framework-decorators-question

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!