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

Popular posts from this blog

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -