sitecore8 - Sitecore glassmapper how to fetch the datasource from the rendering -
need suggestion on sitecore rendering want use glassmodel render item.
i have page , has many renderings , each renderings has data source associated it.
i know below statement give me current context, not datasource item.
var context = new sitecorecontext(); model = context.getcurrentitem<homepage>(); what best option solve query? gave gone through this article. i'm not convinced method i'm using ioc (windsor castle) , have write unit test cases each method. may have mock these objects later. i'm looking approach using interface not class.
appreciate help.
if controller derived glasscontroller can use getdatasourceitem<i..>(). give datasource.
Comments
Post a Comment