I want to load extensions dynamically, list of extension to load will be taken from database. i am able to load extensions but getting problem while applying layout. And the extensions can be placed anywhere on form which will be decided at runtime.
I mean to say there will be many extensions present in protected/extensions folder and the list of extension to load on page will be fetched from the database, the database will contain the list of extensions with there name and path. and also the place where it should be placed like left pane or right etc.
lets say i fired a query and got result that i have to load a 'login' extension in right pane then i should be able to load that extension in right pane of the page. page is be divided into five parts like right pane, left pane, header, footer and body. and extensions could be loaded in any of this parts.
so the problem is i have the extension but don't know how to load them at runtime at correct location (left,right pane etc.) .
I think what you meant is portlet. Do not confuse it with extension. The latter is oriented for developers (it's like third-party libraries, which can be anything).
You may implement this by placing the following code in your main layout (roughly):