Refact: multiplex between htmlmixed and smarty modes(only)