Hi
As a progression on some of my previous questions, I am trying to loop through the files of a folder and displaying them in a list.
All this is based on eCom product custom field, with the tag and systems name Images.
My not working code so far is like this:
Hi Again
I am trying to grab this inside an foreach loop, and theres proably a whole lot wrong with my code, but maybe anyone would be so kind to indicate what I am doing wrong?
My code is
@foreach (LoopItem i in GetLoop("Products")){
string input = i.GetValue("Ecom:Product:Field.Images.Clean");
string folder = input.Substring(0, input.LastIndexOf("/"));
foreach(var file in GetLoop(folder.ListOfFiles)){
GetValue(folder)/@file.GetValue(folder.FileName);
}
}
But this doesn´t work, and the error I get is the following:
Line 28: Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?) Line 32: 'string' does not contain a definition for 'ListOfFiles' and no extension method 'ListOfFiles' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)