I am trying to get all items at the current item level. I am using Glass Mapper SitecoreQuery
for the same. I am able to get the current item but not able to map all siblings
public class TestModel:BaseModel
{
[SitecoreQuery("../*")]
public virtual IEnumerable<Model1> Siblings { get; set; }
}
[SitecoreType(AutoMap = true)]
public class Model1 : BaseModel
{
}
Base Model has all the required fields and correctly mapped. I am actually trying to display all items at the level of current item.
SitecoreQuery
:IsRelative = true
like that:[SitecoreQuery("../*", IsRelative = true)]
– Marek Musielak[SitecoreType(AutoMap = true)]
above your TestModel class. – Santiago Morla