Developer forum

Forum » Feature requests » Get value from folder item type field using a more direct method

Get value from folder item type field using a more direct method

Fabio Monte
Reply

Hello

Sometimes we implement folder field types in the custom website settings but we don't have a direct method to get the value of that field as i.e GetString or GetFile

We always have to load the GetItem and then load the needed field again as per example below:

var customSettings = Dynamicweb.Services.Items.GetItem("CustomWebsiteSettings", Pageview.AreaSettings.GetItem("Custom").GetItem("CustomSettings").Id);
var pathToFolder = customSettings["FAADocumentsFolder"].ToString();

Would it be an improvement to have something like: Pageview.AreaSettings.GetItem("Custom").GetItem("CustomSettings").GetFolder("FAADocumentsFolder")  instead?


Replies