* @param context The XDIME context used.
* @return The rewriter
*/
public static URLRewriter createURLRewriter(MarinerPageContext pageContext, PageURLType pageURLType) {
final MarinerPageContext context = pageContext;
final PageURLType pageType = pageURLType;
return new URLRewriter() {
public String rewrite(String url) {
return context.getAssetResolver()
.rewriteURLWithPageURLRewriter(url, pageType);