codeguy/Slim — Issue #240: Layout
Author: panczypani
Created: 2012-02-04 15:46:23+00:00
State: open

I suggest add support for layout/templates. See at http://stackoverflow.com/questions/7017755/sub-views-layouts-templates-in-slim-php-framework . I suggest opt-out disable layout for ajax.

public static function set_layout($layout=NULL,$in_ajax=false)
{
if(!Slim::getInstance()->request()->isAjax() || $in_ajax){ //Disable layout in Ajax
self::$_layout = $layout;
};
}