More in this section

Forums / Developing with Sitefinity / accesing department field in product list

accesing department field in product list

2 posts, 0 answered
  1. Anthony
    Anthony avatar
    9 posts
    15 Nov 2011
    01 Mar 2012
    Link to this post
    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?

  2. Grace Hallwachs
    Grace Hallwachs avatar
    144 posts
    03 Nov 2014
    05 Mar 2012
    Link to this post

    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" />
    Also if you need to access the department through code, you can use the code snippet below and don't forget to include the Telerik.Sitefinity.Model reference at the top of the code.

    using Telerik.Sitefinity.Model;

    Please let us know if you have anymore questions.

    Kind regards,
    Grace Hallwachs
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered