Apache Wicket > Framework Documentation > Reference library > How to do things in Wicket > Configuration > Use a different extension for template files > Use a different extension for template files_1_2
Added by Gerolf Seitz, last edited by Gerolf Seitz on Aug 14, 2007

To accomplish this you need to override the WebPage.getMarkupType() method in your page class.

For instance, the default:

public String getMarkupType()
{
	return "html";
}

can be overridden to be something like:

public String getMarkupType()
{
	return "xhtml";
}

See the source code for the Alternative Markup (XML) example for a more complete demonstration of this concept.