I have a macro partial that I am trying to create. I am an umbraco newbie. I have a folder in media with sunflowers . I would like to display a list of files from each sunflower based on the name of the page that the user is on. This name corresponds to the folder name in the library.
I can list files from the folder but cannot seem to filter using a where clause
@inherits Umbraco.Web.Macros.PartialViewMacroPage
<h2>@CurrentPage.title</h2>
@{
var gallery = new umbraco.MacroEngines.DynamicMedia(1124);
}
@foreach (dynamic item in gallery.Descendants())
{
<ahref="@item.File"target=_blank>@item.title</a><br/>
@item.synopsis <br/>
}
What I want to do is restrict the list based on the folder name by taking the
@CurrentPage.title and feeding that to the list. Also to filter by file date.
umbraco 7 razor for document library solution
I have a macro partial that I am trying to create. I am an umbraco newbie. I have a folder in media with sunflowers . I would like to display a list of files from each sunflower based on the name of the page that the user is on. This name corresponds to the folder name in the library.
I can list files from the folder but cannot seem to filter using a where clause
@inherits Umbraco.Web.Macros.PartialViewMacroPage
What I want to do is restrict the list based on the folder name by taking the
@CurrentPage.title and feeding that to the list. Also to filter by file date.
Am I approaching this in the correct way?
is working on a reply...