accesing department field in product list
For the e-comm module in sitefinity 4.4 I need to access the department field and use it to help build a hyperlink does anybody no how to access the department field and how it handles sub departments?
Hi,
Can you clarify what you mean by "you need to access the department in the Products list widget?" If you need to add the Department field to the Products Details page then you can go to the Products List widget >> Edit >> Single Item settings >> Edit template for Products Details and drag on the Department field onto the
template or add the code from the code sample below.
<
sitefinity:HierarchicalTaxonField
ID
=
"HierarchicalFieldControl"
runat
=
"server"
TaxonomyId
=
"D7831091-E7B1-41B8-9E75-DFF32D6A7837"
DisplayMode
=
"Read"
WebServiceUrl
=
"~/Sitefinity/Services/Taxonomies/HierarchicalTaxon.svc"
Expanded
=
"false"
TaxonomyMetafieldName
=
"Department"
ExpandText
=
"ClickToAddCategories"
BindOnServer
=
"true"
/>
using Telerik.Sitefinity.Model;
...product.GetValue("Department")