Copied to clipboard

Flag this post as spam?

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


  • Mike Poole 53 posts 165 karma points
    May 04, 2020 @ 17:52
    Mike Poole
    0

    New View not creating template in Umbraco

    I have an existing project that is running Umbraco 7.10

    Whenever we create a new view, the template is not created in Umbraco (but new Partials are) when we deploy to existing environments

    We are not using uSync at present and the umbracoSettings.config template section is set to Mvc rather than WebForms

    What is stopping the template being present in Umbraco? is it something I am missing in the cmsTemplate table?

    Many thanks

    Mike

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    May 04, 2020 @ 19:56
    Marc Goodson
    0

    Hi Mike

    The Partials folder in Umbraco Backoffice just reads the partial view files from disk, so adding a new file here immediately shows up in Umbraco - however 'Templates' in Umbraco can be associated with specific Document Types and be nested underneath other templates, showing their inheritance hierachy - in order to achieve this each template has an entry in the Umbraco Database, to allow the relations to be made between entities.

    Consequently adding the file on disk doesn't trigger the template to be created in Umbraco.

    If you need to move templates between environments, then a tool such as uSync is designed to take the settings stored in the Umbraco database, and serialise them to disk, so they can be moved to a different environment and imported back in.

    If you manually create the template with the same name in the other environment, you can then manually copy in the file on disk with your implementation.

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft