This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Use a different extension for template files

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Excerpt
hiddentrue

How to use a files with an extension other than ".html" as templates

Info
titleFor Wicket 1.2.x users

The Wicket 1.2.x version of this page can be found here.

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

For instance, the default:

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

can be overridden to be something like:

Code Block
public final String getMarkupType() {
	return "xhtml";
}

protected final void configureResponse() {
	super.configureResponse();
	getResponse().setContentType("text/html");
}

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