I am trying to get all the elements at the current element level. For this I use Glass Mapper SitecoreQuery. I can get the current item, but could not match all the siblings
public class TestModel:BaseModel
{
[SitecoreQuery("../*")]
public virtual IEnumerable<Model1> Siblings { get; set; }
}
[SitecoreType(AutoMap = true)]
public class Model1 : BaseModel
{
}
The base model has all the necessary fields and is correctly displayed. I'm actually trying to display all the elements at the level of the current element.
source
share