Copied to clipboard

Flag this post as spam?

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

  • Meni 216 posts 390 karma points
    Jan 30, 2023 @ 00:03

    How to get node properties in Umbraco 11


    I have a Document type in my website - NewsPage that have the following properties: title subTitle, articleImg, etc.

    In my 7.15.7 website I display the title as follow:

    <a href="@Imaging_pagesToList.Last().Url">
                            <h3 class="MainNewsTitle-1">

    which doesn't work in Umbraco 11.

    When migrate the code base to 11.1 I tried:

    <h3 class="MainNewsTitle">@Model.Value("title")</h3>

    or in other place


    but it didn't display nothing.

    So I tried:

    <h3 class="MainNewsTitle">@Model.Name</h3>

    and when I'm using .Name , instead of Value("title") I do get the value of the title

    But I'm not understand: I don't have property in PageNews Document Type for Name ?? I have for title !

    so why it displays the title when I'm using @Model.Name ??

    So why bother and having property for title?

    I'm confused

    Please advise.


  • Huw Reddick 1333 posts 4657 karma points c-trib
    Jan 30, 2023 @ 09:44
    Huw Reddick

    Hi Meni.

    Not sure exactly what you are doing, but Name is a standard property which all nodes will have, and unless you set them to be the same should not have the same value as your (custom) title property.

    e.g. Example node enter image description here

    In the template you add the following


    Which should give you an out put of

    Test page

    Page Title

    sub title

  • Meni 216 posts 390 karma points
    Jan 30, 2023 @ 18:55

    Hi, thanks. Seems I had an issue with the document types in the migration. I took a fresh version of the upgraded v11 database , deleted the Generic properties group from the document type and created again and saved and now Value(“title”) works. Thanks again for your help

Please Sign in or register to post replies

Write your reply to: