Copied to clipboard

Flag this post as spam?

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


  • Alejandro 23 posts 45 karma points
    Aug 18, 2015 @ 17:10
    Alejandro
    0

    How to show template with .Mobile in the backend

    Hello everyone,

    I have a site which has separate desktop and mobile templates. I'm not using the alt template method but instead rely on the feature that redirects to files with the .Mobile in the file name.

    Everything is working great, but the templates that have .Mobile in their names are not showing in the backend. The partial views with .Mobile DO show up in the backend. Is there a way to make this work?

    Thanks!

  • Mark Bowser 273 posts 860 karma points c-trib
    Aug 18, 2015 @ 21:25
    Mark Bowser
    0

    Did you create the templates within Visual Studio? If so, they aren't showing up in the umbraco backoffice because they aren't registered as a template in the database yet. All you have to do is create a template of the same exact name under its parent in the template tree, and you will see your template show up in the umbraco backoffice.

    So far as I know you need to do this one by one. I do the same thing. I like to work in Visual Studio for the intellisense, but I always have to make sure that umbraco knows the template exists, so I can add it as an allowed template on document types and things like that.

  • Alejandro 23 posts 45 karma points
    Aug 18, 2015 @ 22:15
    Alejandro
    0

    That's what I thought, but when I tried adding the template and setting the alias with the .Mobile, it appears that it's saved correctly but when I check again the '.' has been removed.

    So I end up with MyTemplateMobile instead of MyTemplate.Mobile which doesn't work. Sorry that I forgot to mention that on the post.

Please Sign in or register to post replies

Write your reply to:

Draft