Announcement

Collapse
No announcement yet.

Breadcrumb_Array_Generator Parameters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Breadcrumb_Array_Generator Parameters

    Does anyone know which parameters are passed on to this function?

    Code:
    
    <mvt:do file="g.Module_Root $ '/modules/component/cmp-cssui-breadcrumbs.mvc'" name="l.success" value="Breadcrumb_Array_Generator(counter_cat var, category var, all_settings var, breadcrumbs var, cat_array var)" />

    I am looking to generate breadcrumbs in a feed from the l.settings:categories array.
    http://www.alphabetsigns.com/

    #2
    Breadcrumbs are used for site navigation and typically not used in a feed. Are you looking to get the canonical category assigned then the list of parent categories for that product?

    To get the parent category of the products canonical category code you could use this snippet: https://docs.miva.com/code-samples/p...tegory-childof

    In the feed template the canonical category is available using
    Code:
    l.settings:record:canonical_category
    Nicholas Adkins
    Technical Training Specialist / Miva, Inc.
    [email protected]
    https://www.miva.com/mivalearn

    Comment


      #3
      Hi Nick,

      Thank you for the quick reply!

      I am using breadcrumbs in my Google Merchant feed for the product_type schema.

      I am using an mvt:while loop to recursively create the list using a similar code that you provided.

      I think that using the smart breadcrumbs would be a quicker and more accurate than my recursion method.

      I have seen the Breadcrumbs_Initailze and the CategoryList_Load_Recursive functions in the breadcrumbs module but am struggling with the correct parameters and use.

      Which function do you recommend?

      Dan

      http://www.alphabetsigns.com/

      Comment


        #4
        This type of set up is typically done with the recursion method and pulling the canonical category then the parent categories. Another popular method is to store the data in a product custom field then use the custom field value in the feed. I would not recommend using the breadcrumbs functions in the feeds template because I am not sure you can generate all the data necessary to get the results plus I could see it causing performance issues.

        Nicholas Adkins
        Technical Training Specialist / Miva, Inc.
        [email protected]
        https://www.miva.com/mivalearn

        Comment

        Working...
        X