Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
At http://www.theframeroom.com/pre-made-frames.aspx I have unchecked the "Display on web site" checkbox in uCommerce for several categories, for instance Moulding, Mats, and Material.
But, they are still showing in the menu on the left.
Any clues?
Thanks.
Kory
Hi Kory
In the script (assuming you are using razor) where you are getting/listing the categories the code should be something like
var cats = Category.All().Where(c=>c.DisplayOnSite == true);
this should filter out the ones where display on site checkbox is unchecked.
Shouldn't that be in the core Umbraco code by default? Just wondering why I would need to set that.
Also, I am using uCommerce so not sure if it's some sort of conflict.
Also, are your refering to the scripting file uCommerce/LeftNavigation.cshtml?
Thanks again.
Yes, Left navigation renders the categories. You need to set that. It has nothing to do with Umbraco. It's all uCommerce there.
You could do it like this on line 10 in LeftNavigation:
@foreach (var category in categories.Where(x => x.DisplayOnSite))
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Categories still showing even though "Display on web site" unchecked
Hi,
At http://www.theframeroom.com/pre-made-frames.aspx I have unchecked the "Display on web site" checkbox in uCommerce for several categories, for instance Moulding, Mats, and Material.
But, they are still showing in the menu on the left.
Any clues?
Thanks.
Kory
Hi Kory
In the script (assuming you are using razor) where you are getting/listing the categories the code should be something like
var cats = Category.All().Where(c=>c.DisplayOnSite == true);
this should filter out the ones where display on site checkbox is unchecked.
Shouldn't that be in the core Umbraco code by default? Just wondering why I would need to set that.
Also, I am using uCommerce so not sure if it's some sort of conflict.
Thanks.
Also, are your refering to the scripting file uCommerce/LeftNavigation.cshtml?
Thanks again.
Kory
Yes, Left navigation renders the categories. You need to set that. It has nothing to do with Umbraco. It's all uCommerce there.
You could do it like this on line 10 in LeftNavigation:
@foreach (var category in categories.Where(x => x.DisplayOnSite))
is working on a reply...