I made a change to a documenttype and since I wanted to have this change out while the rest of the release isn't ready, I wanted to just add 1 field to a documenttype. Fill a value in and display it on the front-end.
Since I have LiveAppModel as datamodel I thought I could just do it on the fly and refresh my model and then be ready to use it immidiatly.
Hower when I tried to add it i a partial view, it crashed
@Model.AboutText
But when I added it like this it did work:
@Model.Value("AboutText")
Is this normal behaviour ?
Note the rest of the page are all strongly typed as @Model.FieldName it's only this new field in the DocumentType that I can't reference like this.
According to the official documentmentation I think it should still work that's why I asked the question. Pretty sure it worked like this in the past with LiveAppModel. So probably a bug or it's behaviour has changed not sure.
LiveAppModel working different then expected
I made a change to a documenttype and since I wanted to have this change out while the rest of the release isn't ready, I wanted to just add 1 field to a documenttype. Fill a value in and display it on the front-end.
Since I have LiveAppModel as datamodel I thought I could just do it on the fly and refresh my model and then be ready to use it immidiatly.
Hower when I tried to add it i a partial view, it crashed
But when I added it like this it did work:
Is this normal behaviour ?
Note the rest of the page are all strongly typed as @Model.FieldName it's only this new field in the DocumentType that I can't reference like this.
I think that should work. Maybe try Content > Republish entire site to see if rebuilding the cache helps?
Hi Patrick
You need to use "PureLive" if you want to add properties on the fly.
When you use "LiveAppData" you have to recompile models dll with visual studio.
Here all possible Models'Builder settings - https://our.umbraco.com/documentation/reference/templating/modelsbuilder/configuration
Thanks,
Alex
According to the official documentmentation I think it should still work that's why I asked the question. Pretty sure it worked like this in the past with LiveAppModel. So probably a bug or it's behaviour has changed not sure.
is working on a reply...