Hello,
Is there a way we can get the value in item field property Do not include in search using the API?
We are using an item published and would like to exclude from the search all fields that have this property set to true.
Thank you.
Hello,
Is there a way we can get the value in item field property Do not include in search using the API?
We are using an item published and would like to exclude from the search all fields that have this property set to true.
Thank you.
Hi Pedro
The information is available on the ItemField object: https://doc.dynamicweb.com/apix/api/Dynamicweb.Content.Items.Metadata.ItemField.html#Dynamicweb_Content_Items_Metadata_ItemField_ExcludeFromSearch
You can do something like this:
var meta = ItemManager.Metadata.GetItemType("ItemTypeSystemName"); var fields = meta.GetAllFields(); foreach (ItemField field in fields) var excludeFromSearch = field.ExcludeFromSearch; }
Hi Nicolai,
That does it! Thank you so much for your help.
You must be logged in to post in the forum