Copied to clipboard

Flag this post as spam?

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


  • J 445 posts 862 karma points
    Nov 29, 2017 @ 16:57
    J
    0

    Displaying map

    I have installed Terratype. Created a dataType, Added this to my document type (called the value myMap). When i create a page i can see the map and the defaults i set.

    When i run the page i dont see a map? I added some markup as below

    @Html.Terratype("myMap")

    but this didnt work as im not using MVC so it displays as text in a regular template. Read the documentation but i cant see a way to render/show the map on the public page?

  • Jonathan Richards 288 posts 1742 karma points MVP
    Nov 29, 2017 @ 17:21
    Jonathan Richards
    0

    Interesting. It feels like you don't have a Razor page, which you must have to be able to call Razor commands.

    Can you post your Razor template, including all the @inherits, @model or @using statements present please ?

  • J 445 posts 862 karma points
    Nov 30, 2017 @ 09:18
    J
    0

    I didn't create any Razor page(s) - where should i have created this please? Or would there be one installed by default that i need to target?

  • Jonathan Richards 288 posts 1742 karma points MVP
    Nov 30, 2017 @ 09:26
    Jonathan Richards
    1

    The backend of Umbraco calls them 'Templates', and they are stored in your /views/ folder. As you create doctypes, Umbraco will create corresponding templates (Except if you ask it not too)

    Normally they start with the line

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    

    but it is possible to have other combinations, depending on what you have done and what you have loaded, hence why I'm interested in seeing what yours look like.

    If on the very off chance you aren't using razor templates to view your website, what technology/method are you employing? A popular one lately is creating headless CMS. Sadly this type of thing is incompatible with, or even irrelevant to @Html.Terratype().

  • J 445 posts 862 karma points
    Nov 30, 2017 @ 09:36
    J
    0

    Thanks Jonathan. I looked at Views (under root directory) and can see MacroPartials and Partials folder only.

    I'm using webforms, so not sure if this is throwing a spanner into it?

    Or i can recreate a new doc type and take it from there? If so anything specific i would need to do/not do?

  • Jonathan Richards 288 posts 1742 karma points MVP
    Nov 30, 2017 @ 09:42
    Jonathan Richards
    100

    I'm using webforms, so not sure if this is throwing a spanner into it?

    Sadly yes, @Html.Terratype() is not compatible with webforms. I hadn't thought anyone would be using that technology post Umbraco 7.4, which is the minimum version Terratype supports.

    Hopefully we can throw the question open and hope someone in the community might have some existing code they have for webforms. For myself, I don't, sorry.

  • J 445 posts 862 karma points
    Nov 30, 2017 @ 09:52
    J
    0

    Thanks for trying though

Please Sign in or register to post replies

Write your reply to:

Draft