When we want to make a simple conditional based on the controller name or the view name it's easy inside the templates (see here). But to do the same inside the templates listeners is not as easy (hook & postrender). I've found the solution of DigitalPoint (here) & the one of Rigel (here). What is the best solution? Isn't there a simpler way? Purpose: having two different kinds of layout for the editor (full - simple/mobile). Simple layout would be activated when a certain controller/view type is matched or if the user is on a mobile device. Otherwise, it will be the full layout that will be displayed. This function could be integrated in the buttons manager.