@{
var selection2 = Model.Content.Site().FirstChild("specialitasaink").FirstChild("termekKontener").Children("termekElem")
.Where("fooldaliMegjelenites");
}
@{
var selection3 = Model.Content.Site().FirstChild("specialitasaink").FirstChild("termekKontener").Children("termekElem")
.Where("fooldaliMegjelenites");
}
Hey, I would like to ask for help. I want to query with selection2 the first item, an with selection3 the other items except the first. How can I do this?
If I understand correctly would this work for you?
@{
var allSelections = Model.Content.Site().FirstChild("specialitasaink").FirstChild("termekKontener").Children("termekElem")
.Where("fooldaliMegjelenites");
var firstSelection = allSelections.FirstOrDefault();
var remainingSelections = allSelections.Skip(1);
}
You might find better performance in writing the first selection of items with XPath, eg
var allSelections = Umbraco.TypedContentAtXPath("root/homePage/specialitasaink/termekKontener/termekElem/fooldaliMegjelenites[@isDoc]");
(or similar depending on the xml in your published umbraco.config file)
Query
Hey, I would like to ask for help. I want to query with selection2 the first item, an with selection3 the other items except the first. How can I do this?
Hi Nso
If I understand correctly would this work for you?
You might find better performance in writing the first selection of items with XPath, eg
var allSelections = Umbraco.TypedContentAtXPath("root/homePage/specialitasaink/termekKontener/termekElem/fooldaliMegjelenites[@isDoc]"); (or similar depending on the xml in your published umbraco.config file)
is working on a reply...