////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
////

All Markup views subclass the link:{api}grails/plugin/markup/view/MarkupViewTemplate.html[MarkupViewTemplate] class by default.

The `MarkupViewTemplate` superclass implements the link:{api}grails/plugin/markup/view/api/MarkupView.html[MarkupView] trait which in turn extends the link:{api}grails/views/api/GrailsView.html[GrailsView] trait.

Much of the API is shared between JSON and Markup views. However, one difference compared to JSON views is that you must use `this` as a prefix when refering to properties from the parent class. For example to generate links this will produce a compilation error:

[source,groovy]
cars {
   cars.each {
       car(make: it.make, href: g.link(controller:'car'))
   }
}

However, the following works fine:

[source,groovy]
cars {
   cars.each {
       car(make: it.make, href: this.g.link(controller:'car'))
   }
}

Notice the `this` prefix when refering to `this.g.link(..)`. 
