The docs are being build. V8 is as much a work in progress as v7 is.
The internal code in umbraco differs alot, but implementing sites are still 95% the same, with a few tweaks like using Model.Value(“alias”) instead of GetPropertyValue and so on.
How I can use @inherits Umbraco.Web.Mvc.UmbracoTemplatePage on umbraco 8.
Right now all the codes are different and as there are no documentation for umbraco 8 codebase, i am finding it very time comsuming to find the right syntax to code.
In Umbraco V8, all of your views (Templates) and partial Views should have
@inherits UmbracoViewPage at the top and not @inherits UmbracoTemplatePage. This is because UmbracoTemplatePage does not exist in Umbraco v8.
What this also means is that instead of having to type Model.Content at to access the IPublishedContent of a page, instead you only have to type Model.
If you get that error, you need to remove .Content from the line that is throwing the error.
Also, there is no GetPropertyValue either, instead it is only Value
So,
What used to be Model.Content.GetPropertyValue<string>("myTextProperty") is now Model.Value<string>("myTextProperty").
Umbraco 8
Hello,
I am using Umbraco 8 for the first time.
Does the code differ completely from umbraco 7 ?
Do we have a doc for umbraco 8 template/ partial view guideline coding ?
Thanks for helping.
K
i am getting the above error.
The docs are being build. V8 is as much a work in progress as v7 is.
The internal code in umbraco differs alot, but implementing sites are still 95% the same, with a few tweaks like using
Model.Value(“alias”)
instead of GetPropertyValue and so on.Actually I just did ;-)
In v7 model was a wrapper with the Content property having the actual content. In v8 model is the content.
Just remove
.Conent
from your codeit worked soren.
thanks.
Hello Soren,
How I can use
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
on umbraco 8.Right now all the codes are different and as there are no documentation for umbraco 8 codebase, i am finding it very time comsuming to find the right syntax to code.
Can you please help.
Thanks,
Kusum
Hi,
What I Normally do is to read the source, and figure out what has been changed and replaced. In this case I found this thread: https://our.umbraco.com/forum/contributing-to-umbraco-cms/94470-replace-umbracotemplatepage-with-umbracoviewpage
I hope it can help you in the right direction :-)
ok thanks.
Can you please advise why I am getting the below error :
thanks
Hey K,
That is the same error you posted further up.
In Umbraco V8, all of your views (Templates) and partial Views should have
@inherits UmbracoViewPage
at the top and not@inherits UmbracoTemplatePage
. This is becauseUmbracoTemplatePage
does not exist in Umbraco v8.What this also means is that instead of having to type
Model.Content
at to access the IPublishedContent of a page, instead you only have to typeModel
.If you get that error, you need to remove
.Content
from the line that is throwing the error.Also, there is no
GetPropertyValue
either, instead it is onlyValue
So,
What used to be
Model.Content.GetPropertyValue<string>("myTextProperty")
is nowModel.Value<string>("myTextProperty")
.Does that clarify things for you?
Nik
Thanks Nik.
k, I found a pdf file on Shannon's blog which contains some changes between v8 and v7.
Thanks Tariq
Is Position() still relevant in umbraco 8 ?
is working on a reply...