support custome popup template and alternate class

support custome popup template and alternate class