我是Umbraco的新手。目前我正在开发我的新项目,其中我有Umbraco 4.11.9。我从Dynamic CRM获取数据并希望在Umbraco网站上显示
现在我的问题是如何使用Xlst文件放置此内容? 我的旧开发人员使用xslt来设计和呈现静态内容。
也有任何其他方式不使用xslt仍然我可以渲染内容。
谢谢
I am new in Umbraco.Currently I am working on my new project in which I have Umbraco 4.11.9.I am fetching data from Dynamic CRM and want to display on Umbraco website
now my question is how can I place this content using Xlst file? my old developer use xslt for desingning and render static content.
also is there any other way to not use xslt and still I can render content.
thanks
最满意答案
1)您可以使用一些为您提取数据的自定义函数扩展xslt( http://our.umbraco.org/wiki/reference/xslt/extend-your-xslt-with-custom-functions )
2)您可以使用razor宏代替使用xslt宏,这将允许您直接在宏中编写c#代码。 ( http://our.umbraco.org/documentation/reference/templating/macros/razor/ )。
3)除此之外,您仍然可以使用razor或xslt并使用javascript和ajax获取数据。
我建议使用razor宏,但只有在创建新的宏时,才需要完全重写宏,并且只有ajax作为最后的出路,除非它以这种方式动态才有意义。
1) You can extend xslt with some custom functions that fetch the data for you (http://our.umbraco.org/wiki/reference/xslt/extend-your-xslt-with-custom-functions)
2) Instead of using xslt macros you can use razor macros, which will allow you to write c# code directly in the macro. (http://our.umbraco.org/documentation/reference/templating/macros/razor/).
3) Other than that you could still use either razor or xslt and fetch the data with javascript and ajax.
I would propose to use razor macros, but only if creating new macros, as that would require a total rewrite of the macro, and only ajax as the last way out, unless its dynamic in such way it would make sense.
更多推荐
发布评论