Copied to clipboard

Flag this post as spam?

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

  • summer 1 post 31 karma points
    Aug 26, 2021 @ 08:10

    I can't find a layout file in settings page but it can normal display in website

    hello everyone! I have trouble when I deal with a case that made by former colleague! He made a home.cshtml and layout just only write one line:

    @{ Layout = "master.cshtml"; }

    I click any tree list in settings page but still can't find any file named master.cshtml!! But header is normal display of the webpage.I really really so confused......

    I check the file in visual code,I really sure the master.cshtml is header of home.cshtml,but in the Umbraco,I just can't find the Mysterious File!!!!Where is it going!!??

    I try to search keyword like :Umbraco layout but can't find right answer for me ....if you know what happen and what is the answer, please tell me ,I can't thank you enough!!!

  • Huw Reddick 662 posts 2155 karma points
    Aug 26, 2021 @ 12:11
    Huw Reddick

    it should be under

    Settings - Templates section of the tree in the backoffice. or you can locate it in the Views folder of the website.

  • Søren Kottal 618 posts 3965 karma points MVP 4x c-trib
    Aug 26, 2021 @ 13:11
    Søren Kottal

    Hi Summer

    The template tree in the backoffice is based on the template records in the database. You can have a master.cshtml view without having it as a template in Umbraco, which is probably what you have got.

    In the later versions of Umbraco, you can just create a new template called Master, and then it will merge your master.cshtml with the template.

Please Sign in or register to post replies

Write your reply to: