Access additional DataPipeline from Razor view in

2019-07-23 12:27发布

问题:

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