InterviewSolution
Saved Bookmarks
| 1. |
How Can I Output Html Passed By The Controller In My Kid Templates? |
|
Answer» Use ${XML(mytemplatevar)} or refactor by defining and using a KID template function, for EXAMPLE: <a PY:def="link(url, text)" HREF='${url}'>${text}</a> Then in your template you use: ${link('http://foo.com/', 'Foo.com')} Which will RENDER to this output: <a href='http://foo.com/'>Foo.com</a> Use ${XML(mytemplatevar)} or refactor by defining and using a kid template function, for example: <a py:def="link(url, text)" href='${url}'>${text}</a> Then in your template you use: ${link('http://foo.com/', 'Foo.com')} Which will render to this output: <a href='http://foo.com/'>Foo.com</a> |
|