Forum Discussion

srinivaskiranp's avatar
7 years ago

how can i retrieve Specific Category properties.

category properties

In the above picture how can i retrieve "Hide from lists and menus" property for category archive.

regards

Srinivas Kiran 

  • luk's avatar
    luk
    7 years ago

    srinivaskiranp You can get it either trough API v1 or v2:

    v1 with something like

    <#assign hidden = restadmin("categories/id/<categoryid>/settings/name/config.hidden").value />

    v2 with something like:

    <#assign query = "SELECT hidden FROM categories WHERE id = '<categoryid>'"?url />
    <#assign hidden = restadmin("2.0", "/search?q=${query}").data.items[0].hidden />

    note that you need to set off these requests with admin permissions...

    • srinivaskiranp's avatar
      srinivaskiranp
      Guide

      Hi 

      "Hide from lists and menus"  is a custom property which is mention in my initial post. 

      • rpanda2007's avatar
        rpanda2007
        Guide
        You can get it by going to Admin > community Structure and navigate to the category you want to get the property.

        Keep your mouse on top of that and you will see an option called edit properties.

        After clicking that you will see the options.

        ##- Please type your reply above