如何在Umbraco 4.11.9中的xslt中放置动态内容(How to place dynamic content in xslt in Umbraco 4.11.9)

编程入门 行业动态 更新时间:2024-10-05 17:27:33
如何在Umbraco 4.11.9中的xslt中放置动态内容(How to place dynamic content in xslt in Umbraco 4.11.9)

我是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.

更多推荐

本文发布于:2023-08-07 12:15:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464077.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内容   动态   如何在   Umbraco   content

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!