Unfortunately, I don't seem to have access to the NodeAliasPath either. What I'm trying to do is loop through the OrderItems and matching them up with the page type that I have the custom field in. I think the macro needs to look something like this:
{% for(i = 0; i < Order.OrderItems.Count; i++) {
for(j = 0; j < Documents["/HFA-Products"].Children.Count; j++) {
if(Contains(Order.OrderItems[i].OrderItemSKU.ToString(), Documents["/HFA-Products"].Children[j].SKU.DisplayName.ToString()) {
Documents["/HFA-Products"].Children[j].CustomField;
break;
}
}
} |(identity)GlobalAdministrator%}
Iterating through the Documents["/HFA-Products"].Children isn't working though. It's like it isn't getting the count correct and then it just doesn't go through that loop. I know that Documents["/HFA-Products"].Children.Count is equal to 64 though, so it's not like I'm inputting a value of 0.
Any ideas why I can't iterate through the children like this?