How can we set default layout in zf2 if the layout folder is out side the module directory

You can set the layout anywhere you want it doesn't have to be in the modules directory.
just set it inside your modules config
'view_manager' => array(
'display_not_found_reason' => true,
'display_exceptions' => true,
'doctype' => 'HTML5',
'not_found_template' => 'error/404',
'exception_template' => 'error/index',
'template_map' => array(
'layout/layout' => '/anypath/you/want/view/layout/layout.phtml',
),
'template_path_stack' => array(
'/anypath/you/want/view',
),
),
As per the question posted the answer by @Andrew is correct .
When i notice the working of layout in zf2 i came to certain conclusion
For example
'modules' => array(
'Album',
'Testlist',
'Customer',
'Application',
'User',
),
Then the user layout will be taken .
if we have only one layout in the application this will be fine
To switching between layouts in the module came across http://www.webtrafficexchange.com/zf2-configure-layout-each-module-edpmodulelayouts which seems to be useful