从2sxc模块的Razor视图访问其他DataPipeline [英] Access additional DataPipeline from Razor view in 2sxc module

查看:82
本文介绍了从2sxc模块的Razor视图访问其他DataPipeline的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从已经连接到定制或默认数据管道的剃刀脚本
中访问另一个管道数据?

Is it posible to access another pipeline data from razor script already conected to custom or default data pipeline?

(在一个剃刀视图中有多个管道)

(multiple pipelines in one razor view)

例如:
我的自定义数据管道给了我一些值并基于此值,我
想获得其他自定义管道,并在此剃刀脚本的条件块
中使用其值/列表?

eg: My custom data pipeline give me some values and base on this values I want to get some other custom pipeline and used its values/lists in conditional block of this razor script?

推荐答案

var list = App.Query["Query-Name"]["Stream-Name"].List;
foreach(var item in AsDynamic(list)){
    <div>@item.Title</div>
}

一个很好的示例是:
在2sxc之外使用应用程序数据

这篇关于从2sxc模块的Razor视图访问其他DataPipeline的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆