问题
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