public static boolean isTemplate(PageContext pc,PageSource ps,boolean defaultValue){
  try {
    return !(ps.loadPage(pc,false) instanceof CIPage);
  }
 catch (  PageException e) {
    e.printStackTrace();
    return defaultValue;
  }
}

public static boolean isTemplate ( PageContext pc , PageSource ps , boolean defaultValue ) { try { return ! ( ps . loadPage ( pc , false ) instanceof CIPage ) ; } catch ( PageException e ) { e . printStackTrace ( ) ; return defaultValue ; } }
return if the pagesource represent a template ( no component , no interface )
