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?
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().
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.
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?
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 ?
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?
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
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().
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?
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.
Thanks for trying though
is working on a reply...