Developer forum

Forum » Development » RE: Fetching data from a Itemtype field checkboxes list

RE: Fetching data from a Itemtype field checkboxes list

Jan Sangill
Reply

Hi,

I need to fetch data from my itemtype, which contains fields of the type checkboxes.

I need to fetch these individual fields, and loop through them.

What method could I use frontend in my razor files to do this?


Replies

 
Jan Sangill
Reply

Bump. Anyone with anything?:S

 
Kevin Steffer
Reply

Could you try to write some example code of what you're trying to accomplish?

 
Rene Poulsen
Reply

Hi Jan,

Is it something like this you want to do? http://developer.dynamicweb.com/forum/cms-standard-features/items-is-it-not-possible-to-show-chekcbox-label.aspx

 
Nicolai Høeg Pedersen
Reply

Hi Rene

You just need to load the item and go through its meta data. There is some sample code in Github: https://github.com/dynamicweb/dwtc15/blob/master/mri/Files/Templates/Designs/lib/razor/functions/functions.cshtml

Or an example of taking related items from a checkbox list: https://github.com/dynamicweb/dwtc15/blob/master/mri/Files/Templates/Designs/Dwtc15/Dwtc15_Speaker.cshtml

 
Jan Sangill
Reply

Hi,

Thank you for all the suggestions.
The ideas helped, and I located this method:

Dynamicweb.Content.Items.ItemManager.Metadata.GetItemFields

 

 

You must be logged in to post in the forum