Servicestack Markdown NoRender Master Layout Page, Render partial content

Hi Guys, I am dealing with the Client End for a project that I am working on and the Client is written purely in HTML5 and Javascript with some CSS3 magic. Now we are using ServiceStack and Markdown templating engine as our Web service and Content providers. So you know that when calling a specific service the output can be any of the following JSON HTML XML CSV JSV   The above are really handy when you want to load your javascript Grid, or display content as HTML. 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. Advertisement   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 localhost/yourwebservice/param?format=html.bare 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. … [Read more...]