In the last days I had to discover why on first load of the IIS site SitecoreContext.Database is null.
Tag: glass mapper
Glass Mapper – Edit Frame for all fields dynamically
Today I created a rendering component which has around 10 fields but the whole component is not editable in Experience Editor. I decided to use Edit Frame from Glass Mapper. The BeginEditFrame wants all the editable fields as a parameter. But for around 10 fields not that comfortable.
The following code snippet creates an Edit Frame only with 1 field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @using Glass.Mapper.Sc.Web.Mvc | |
| @model IYourModel | |
| @using (@Html.Glass().BeginEditFrame(Model, "Edit The Component", x => x.Image)) | |
| { | |
| // your code | |
| } |
![Tamás Tárnok = [ C#, Sitecore, … ]](https://trnktms.com/wp-content/uploads/2021/11/pxart_white-small.png)