Copied to clipboard

Flag this post as spam?

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


  • Ole Andreas Myhre Olsen 3 posts 73 karma points
    Jan 06, 2022 @ 22:39
    Ole Andreas Myhre Olsen
    0

    Template files are on the server but not visible in the Settings Tree under Templates

    Hi

    I have a site deployed to several servers, and all except one displays all the templates as expected, but one site does not pick up the template files in the /View folder and show them in the Template Tree under Settings.

    Any idea why the don't show?

    Partials and MacroPartials are visible as expected.

    Any input is appreciated :)

  • Søren Kottal 618 posts 3965 karma points MVP 4x c-trib
    Jan 08, 2022 @ 10:39
    Søren Kottal
    1

    Hi Ole

    This is because templates is actually database entities, with a reference to the files. You can just create a new template with an alias matching the view-file to make it show up. It will not overwrite the file.

    So if you have a /Views/MyTemplate.cshtml file, create a Template in Umbraco called My Template (MyTemplate - will be the alias), and you get the required database entity for the template.

Please Sign in or register to post replies

Write your reply to:

Draft