I've been trying to setup a /Base.mp top level component to check that users have logged on ...
method handle() { # check if they are logged in If(!logged_in()) { $m->redirect('/login'); } # pass on for normal processing if(what???) { # this works for components without a Base.mc $m->main(); } else { # this works for components with a Base.mc $m->render(); } } ... but I don't know how what to put in the if(what???) statement. Does anyone know how to determine what type of component is currently being processed ? I've seen an article called Mason 2 Content Wrapping but neither of techniques seem to work (http://www.openswartz.com/2010/12/15/mason-2-content-wrapping/). Any help much appreciated. Matthew Emails aren't always secure, and they may be intercepted or changed after they've been sent. Produban doesn't accept liability if this happens. If you think someone may have interfered with this email, please get in touch with the sender another way. This message and any documents attached to it do not create or change any contract unless otherwise specifically stated. Any views or opinions contained in this message are solely those of the author, and do not necessarily represent those of Produban, unless otherwise specifically stated and the sender is authorized to do so. Produban doesn't accept responsibility for damage caused by any viruses contained in this email or its attachments. Emails may be monitored. If you've received this email by mistake, please let the sender know at once that it's gone to the wrong person and then destroy it without copying, using, or telling anyone about its contents. Produban Servicios Informaticos Generales, S.L. (UK Branch). Registered office: Shenley Wood House, Chalkdell Drive, Shenley Wood, Milton Keynes MK5 6LA. Branch registration number BR 008486. Ref:[PDB#014] ------------------------------------------------------------------------------ Presto, an open source distributed SQL query engine for big data, initially developed by Facebook, enables you to easily query your data on Hadoop in a more interactive manner. Teradata is also now providing full enterprise support for Presto. Download a free open source copy now. http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140 _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users