We have moved to GitHub Issues
Created by Shannon Deminick 22 Jun 2016, 09:21:50 Updated by Stephan 08 Jan 2018, 09:14:44
Relates to: U4-8625
Subtask of: U4-5419
We are removing support for dynamically accessing content in views in v8. All published content access in v8 will be done using IPublishedContent and strongly typed models.
Can you give examples to verify if this will become an issue on existing projects? I want to be sure my understanding of dynamics is the same as what the core is removing.
You are using dynamics whenever your view inherits from UmbracoTemplatePage and you use the CurrentPage property to access the current content, and do things such as CurrentPage.Title to access the property with alias "title" without using strongly typed models.
Stephan, that was what I suspected. So what is the preferred way to do CurrentPage.Title in version 8? We'd like to get our codebase compatible before version 8 is released.
The ideal way is to use Models Builder to generate strongly typed models for your content types. Then, views should inherit from UmbracoViewPage
We just finished training in Boulder; it is too bad it was still taught using Dynamics. Is it possible to post a sample view just to see an entire page for reference? Also let us know what your DocType is called that is passed in the
This is documented:
https://our.umbraco.org/documentation/Reference/Templating/Mvc/views https://our.umbraco.org/documentation/Reference/Templating/Mvc/examples https://our.umbraco.org/documentation/Reference/Querying https://our.umbraco.org/documentation/Reference/Querying/IPublishedContent
... obviously ignore the dynamic part of the documentation. These docs don't cover access with ModelsBuilder, but that's pretty simple. This is how it would map:
It is important to realize that Models Builder models ARE
IPublishedContent, so all of the ways that you can work with
IPublishedContent will continue to work normally.
@firstname.lastname@example.org also, what would be interesting.... can you share a couple of the "most complex" views from that training? I'd be happy to refactor them to "v8 style" and that could be part of some documentation.
Priority: Task - Pri 1
Backwards Compatible: False
Due in version: 8.0.0