So you know that when calling a specific service the output can be any of the following
Now if we think about the bigger picture we have couple of things when the output is returned as HTML. First consider this from Markdown Docs
Once the appropriate view is executed it’s output is stored in the **’Body’** variable and is merged with its
static website template. The rules for finding the appropriate master website template is simple:
It’s the first **default.shtml** page it can find, looking first in its current working directory then
recursively up the directory hierarchy until it finds one.
The view is merged with the static website template by replacing all **<–@VarName–>** with variables
generated by the page (i.e. in ScopeArgs). i.e. the executed output of the View is stored in the **Body**
variable and is embedded in the static website template by replacing all **<–@Body–>** found.
That’s good that the View is processed and merged to the Master website template what what about if we don’t want that default action to happen?
Ok so this is what you can you.
Its called Bare HTML return
So for instance if you are accessing a page like localhost/yourwebservice/param (which kicks the default merge with Master them) then you can change the URL to this
This will override the Fusion of MD template to the Master template.
Now there are some scenarios where you will want to select a custom Master template. This is common with typical web developers like me who want some more granular control on underlying technology.
Ok so lets see how this is done
If you are using MVC Razor
Add this as your file line in your child template file.
If you are using Markdown Razor then add the following as your first line in your .md child template file
You can also your @template instead of @Layout in the above.
I hope this helps