I'm trying to select categories under a certain categoryparent to display in a dropdown. This works except to filter out the categories that are marked as not visible in admin mode.
What should i do to filter out not visible categories?
Here's the code so far:
Category treatmentParent;treatmentParent = Category.Find(Configuration.CompanySection.Instance.Settings.TreatmentCategoryId);ucTreatmentSelect.DataTextField = "Description";ucTreatmentSelect.DataValueField = "Name";ucTreatmentSelect.DataSource = TranslateCategories(treatmentParent.Categories);DataBind();ucTreatmentSelect.Items.Insert(0, Translate("/categories/treatment"));
what looping over the categories and check if they are visible?