Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable siteEdit for Embedded Fields when using DD4T?

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.

like image 274
user1357019 Avatar asked Dec 12 '25 19:12

user1357019


1 Answers

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"])
like image 124
Albert Romkes Avatar answered Dec 16 '25 07:12

Albert Romkes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!