How to enable siteEdit for Embedded Fields when using DD4T?

331 views Asked by At

I am trying to enable siteEdit for the Embedded fields for the pages implemented using DD4T.

I am able to find the methods and tags which helps to enable it for normal methods and component presentation but not for Embedded Fields and at the components(directly passing the Icompoennt model) level.

I am trying to enable it for SiteEdit2012(UI)

Please help.

1

There are 1 answers

0
Albert Romkes On

The same as a 'normal' field. Imagine you have an embedded field called 'address' with 2 fields: street and number. This is how you would make it !SiteEdit enabled:

//Street  
@Html.SiteEditField(Model.Component, Model.Component.Fields["address"].EmbeddedValues[0]["street"])


//Number
@Html.SiteEditField(Model.Component, Model.Component.Fields["address"].EmbeddedValues[0]["number"])