return WikiMode.EDITTEMPLATE.equals(getAncestorOfType(UIWikiPortlet.class).getWikiMode());