Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • k 256 posts 654 karma points
    May 10, 2019 @ 07:08
    k
    0

    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

  • k 256 posts 654 karma points
    May 10, 2019 @ 07:25
    k
    0

    enter image description here

    i am getting the above error.

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    May 10, 2019 @ 07:25
    Søren Gregersen
    0

    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.

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    May 10, 2019 @ 07:28
    Søren Gregersen
    0

    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 code

  • k 256 posts 654 karma points
    May 10, 2019 @ 07:33
    k
    1

    it worked soren.

    thanks.

  • k 256 posts 654 karma points
    May 13, 2019 @ 06:44
    k
    0

    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

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    May 13, 2019 @ 07:36
    Søren Gregersen
    1

    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 :-)

  • k 256 posts 654 karma points
    May 13, 2019 @ 09:51
    k
    0

    ok thanks.

    Can you please advise why I am getting the below error : enter image description here

    thanks

  • Nik 1614 posts 7260 karma points MVP 7x c-trib
    May 13, 2019 @ 10:04
    Nik
    0

    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 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").

    Does that clarify things for you?

    Nik

  • k 256 posts 654 karma points
    May 13, 2019 @ 10:09
    k
    0

    Thanks Nik.

  • Tarik 196 posts 840 karma points c-trib
    May 13, 2019 @ 10:06
    Tarik
    0

    k, I found a pdf file on Shannon's blog which contains some changes between v8 and v7.

  • k 256 posts 654 karma points
    May 13, 2019 @ 10:09
    k
    0

    Thanks Tariq

  • k 256 posts 654 karma points
    May 13, 2019 @ 10:20
    k
    0

    Is Position() still relevant in umbraco 8 ?

Please Sign in or register to post replies

Write your reply to:

Draft