diff --git a/src/View/View.php b/src/View/View.php index 1124a9b..e6ccc0d 100644 --- a/src/View/View.php +++ b/src/View/View.php @@ -36,33 +36,7 @@ public function __construct(Request $request = null, Response $response = null, } - - - - /** - * View::_getRequestNameID() - * - * @return - */ - protected function _getRequestNameID(){ - $out = []; - - - - $name = $this->request->param('plugin'); - if($name){ - - $name = str_replace('/','',$name); - $out['plugin'] = $name ; - } - - $name = $this->request->param('controller'); - $out['controller'] = ucfirst($name) ; - $name = $this->request->param('action'); - $out['action'] = ucfirst($name); - return $out; - } - + /** @@ -71,8 +45,20 @@ protected function _getRequestNameID(){ * @return */ public function getLayoutID(){ - $out = $this->_getRequestNameID(); + $out = ''; + extract($this->request->params); + + if ($prefix) { + $out .= ucfirst($prefix).'-' ; + } + + if ($plugin) { + $out .= ucfirst($plugin) ; + } + + $out .= ucfirst($controller); + $out .= ucfirst($action); - return 'Page-' . $out['controller'] . $out['action']; + return $out; } } \ No newline at end of file