#19100: Fixing Menu and MenuItem templates when returned by Queries

Work Item: 19100

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-10-11 11:09:26 -07:00
parent 05540bd42f
commit 231e9b0b68
2 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
@{
// odd formatting in this file is to cause more attractive results in the output.
var items = (IEnumerable<dynamic>)Enumerable.Cast<dynamic>(Model);
var items = Enumerable.Cast<dynamic>((System.Collections.IEnumerable)Model);
}
@{
if (!HasText(Model.Text)) {

View File

@@ -5,8 +5,10 @@
Script.Include("admin.js");
IEnumerable<dynamic> firstLevelMenuItems = Model;
foreach (var imageSet in Model.ImageSets) {
RegisterImageSet("menu." + imageSet, Model.MenuName /* style */, 16 /* bounding box */);
if (Model.ImageSets != null) {
foreach (var imageSet in Model.ImageSets) {
RegisterImageSet("menu." + imageSet, Model.MenuName /* style */, 16 /* bounding box */);
}
}
Model.Attributes.Add("role", "navigation");