There's a simple loop script to show all the child files within the folder:
@{ var numberOfItems = 100; }
@foreach (var item in @Model.Children.Where("Visible").Take(numberOfItems) ) {
I need to add 'where' to the query. The user can select from category, year or free text search. I have managed to get the querystring values on the page, but I don't know how to write the code.
If I was writing a SQL statement, it would be something like:
where category = '" & var1 & "' and documentdate = '" & var2 & "' and Description like '%" & var3 & "%' "
Help needed with search string. Will pay for help.
Have a look at http://www.cumbria-pcc.gov.uk/governance-transparency/document-library.aspx
There's a simple loop script to show all the child files within the folder:
@{ var numberOfItems = 100; }
@foreach (var item in @Model.Children.Where("Visible").Take(numberOfItems) )
{
I need to add 'where' to the query. The user can select from category, year or free text search. I have managed to get the querystring values on the page, but I don't know how to write the code.
If I was writing a SQL statement, it would be something like:
where category = '" & var1 & "' and documentdate = '" & var2 & "' and Description like '%" & var3 & "%' "
Hi, first of all you dont need to define that var numberOfItem you can just pass 100 straight into Take(). So .Take(100);
Could you tell me exaclty the data you need to get from you list or IEnum (I am assuming its an IEnum?).
Are you using your own custom model or getting the data straight from Umbraco (Umbraco.TemplatePage)?
Let me know and i will try and help some more :).
Thanks.
Charlie :)
is working on a reply...