diff --git a/module/Application/view/layout/layout.phtml b/module/Application/view/layout/layout.phtml index 75623881..4952ae84 100644 --- a/module/Application/view/layout/layout.phtml +++ b/module/Application/view/layout/layout.phtml @@ -13,9 +13,9 @@ headLink(array('rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/img/favicon.ico')) // ->prependStylesheet($this->basePath() . '/css/style.css') - ->prependStylesheet($this->basePath() . '/sjyportal2/css/bootstrap.min.css') - ->prependStylesheet($this->basePath() . '/sjyportal2/css/bootstrap-responsive.min.css') - ->prependStylesheet($this->basePath() . '/sjyportal2/css/style.css') + ->prependStylesheet($this->basePath() . '/sjyportal/css/bootstrap.min.css') + ->prependStylesheet($this->basePath() . '/sjyportal/css/bootstrap-responsive.min.css') + ->prependStylesheet($this->basePath() . '/sjyportal/css/style.css') ?> diff --git a/module/Metadata/config/module.config.php b/module/Metadata/config/module.config.php index 10403be7..67acbb8c 100644 --- a/module/Metadata/config/module.config.php +++ b/module/Metadata/config/module.config.php @@ -22,50 +22,40 @@ return array( 'router' => array( 'routes' => array( - - //通配路由 - 'metadata' => array( - 'type' => 'Segment', - 'options' => array( - 'route' => '/metadata[/:controller[/:action[/page/:page][/id/:id]]]', - 'constraints' => array( - 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', - 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', - 'page' => '[a-zA-Z][a-zA-Z0-9_-]*', - 'id' => '[a-zA-Z][a-zA-Z0-9_-]*', - ), - 'defaults' => array( - 'module' => 'Article', - '__NAMESPACE__' => 'Article\Controller', - 'controller' => 'Article\Controller\Index', - 'action' => 'index', - ), - ), - 'may_terminate' => true, - 'child_routes' => array( - 'wildcard' => array( - 'type' => 'Wildcard' - ) - ) - ), //数据 - 'data' => array( - 'type' => 'Segment', - 'options' => array( - 'route' => '/data[/:uuid]', - 'constraints' => array( - 'uuid' => '[a-zA-Z][a-zA-Z0-9_-]*', - ), - 'defaults' => array( - 'module' => 'Metadata', - '__NAMESPACE__' => 'Metadata\Controller', - 'controller' => 'Metadata\Controller\Index', - 'action' => 'index', - ), + 'data' => array( + 'type' => 'Zend\Mvc\Router\Http\Literal', + 'options' => array( + 'route' => '/data', + 'defaults' => array( + 'module' => 'Metadata', + '__NAMESPACE__' => 'Metadata\Controller', + 'controller' => 'Metadata\Controller\Index', + 'action' => 'index', + ), + ), + 'may_terminate' => true, + 'child_routes' => array( + 'view' => array( + 'type' => 'Segment', + 'options' => array( + 'route' => '[/:uuid]', + 'constraints' => array( + 'uuid' => '[a-zA-Z][a-zA-Z0-9_-]*', + ), + 'defaults' => array( + 'module' => 'Metadata', + '__NAMESPACE__' => 'Metadata\Controller', + 'controller' => 'Metadata\Controller\Index', + 'action' => 'view', + ), + ), + 'may_terminate' => true, + ), ), - 'may_terminate' => true - ), + ),//data + ),//routers ), diff --git a/module/Metadata/src/Metadata/Controller/IndexController.php b/module/Metadata/src/Metadata/Controller/IndexController.php index 9383532b..47384dac 100644 --- a/module/Metadata/src/Metadata/Controller/IndexController.php +++ b/module/Metadata/src/Metadata/Controller/IndexController.php @@ -42,4 +42,10 @@ class IndexController extends AbstractActionController return $this->ViewModel; } + + public function viewAction() + { + + return $this->ViewModel; + } } diff --git a/module/Metadata/view/metadata/index/index.phtml b/module/Metadata/view/metadata/index/index.phtml index fc92a45a..70fcd91e 100644 --- a/module/Metadata/view/metadata/index/index.phtml +++ b/module/Metadata/view/metadata/index/index.phtml @@ -67,7 +67,7 @@ metadata_latest)) { ?>