Access additional DataPipeline from Razor view in 2sxc module

会有一股神秘感。 提交于 2019-12-24 05:57:31

问题


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?


回答1:


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

Also a good sample is: Using App Data Outside of 2sxc



来源:https://stackoverflow.com/questions/37239330/access-additional-datapipeline-from-razor-view-in-2sxc-module

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