Is there a way to get the htmlFieldPrefix in widget.edit #15860
Replies: 8 comments
-
@SteeveDumais For example, If your widget is called |
Beta Was this translation helpful? Give feedback.
-
I have created the file Content-{MyWidget}.edit.cshtml but it is not being hit. Is there no way to get the value on the widget.edit.cshtml page? |
Beta Was this translation helpful? Give feedback.
-
Hmm! So If your Content Type
|
Beta Was this translation helpful? Give feedback.
-
Where in the model is the prefixe when I go to Widget-News.Edit.cshtml. I have modified the ContentCard-FlowPart.Edit.cshtml to force the Model.ContentEditor.Metadata.Prefix = Model.PrefixValue. I was hoping that I did not have to do that step and that Model.ContentEditor had that value somewhere or it was present int he viewContext |
Beta Was this translation helpful? Give feedback.
-
@SteeveDumais I don't think that you need to change the prefix value. |
Beta Was this translation helpful? Give feedback.
-
I am creating a contentCard that has a Content of stereotype widget. When I display the widget it is a react component. In order for the values to be saved the widget components need to be named "prefixValue. the field name", where the prefixValue is coming from the contentCard. I was hoping there was a way to reference the contentCard prefix in the widget-myWidget.Edit.cshtml page |
Beta Was this translation helpful? Give feedback.
-
@SteeveDumais when you use |
Beta Was this translation helpful? Give feedback.
-
@SteeveDumais with recent change in PR #5989 , now, PrefixValue is ContentItemId for existing Item. |
Beta Was this translation helpful? Give feedback.
-
I am trying to get the html prefix of a widget so that I can manually create the field in Widget-{myWidget}.edit.cshtml.
All my widgets will be in react and I need to name them correctly so that the ModelUpdate will pick up the modification in edit mode.
Beta Was this translation helpful? Give feedback.
All reactions