Hi
On a website (http://www.vildmedand.dk/da-DK/Opskrifter.aspx) I have two page items - category and recipe.
Each recipe can belong in more then one category.
The categories a recipe belongs to is controlled by a checkbox list generated from the categories in the current website area.
I then generate a sort of accordion menu (using @ItemRenderList and filtering - below), where the categories are listed with the related recipies.
<ul>
@foreach (var category in GetLoop("ItemPublisher:Items.List")) {
<li>
<a href='@category.GetString("ItemPublisher:Item.Url")' data-category-id='@category.GetString("ItemPublisher:Item.Field.Id")'>@category.GetString("ItemPublisher:Item.Navn")</a>
@RenderItemList(new {
ItemType = "Opskrifter",
ListSourceType = "SelfArea",
ItemFieldsList = "*",
ListTemplate = "ItemPublisher/List/menu-level2.cshtml",
ListPageSize = 900,
ListOrderBy = "Sort",
ListOrderByDirection = "Ascending",
Filter = "Kategori contains \""+category.GetInteger("ItemPublisher:Item.Field.Id")+"\""
})
</li>
}
</ul>
My problem is that when I try to filter out recipies related to category #1 it also shows recipies related to category #10, category #11, category #12 and so on.
I can't seem to make the filter specific enough (like "equals" instead of "contains") or find the right filter combination to prevent this.
Does anyone have any suggestions?
Best regards
Thomas