CakePHP访问插件控制器
好的,我正在使用ReportManager插件。我可以使用以下url原样使用它:“localhost/AppName/report\u manager/reports” 现在,当我尝试在我正在进行的项目中使用它时,我在访问插件的控制器时遇到了问题 我有一个包含几个链接的侧栏。代码如下:CakePHP访问插件控制器,php,cakephp,Php,Cakephp,好的,我正在使用ReportManager插件。我可以使用以下url原样使用它:“localhost/AppName/report\u manager/reports” 现在,当我尝试在我正在进行的项目中使用它时,我在访问插件的控制器时遇到了问题 我有一个包含几个链接的侧栏。代码如下: <div id="wrapper"> <!-- Sidebar --> <div id="sidebar-wrapper"> <ul cl
<div id="wrapper">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li id="sidebar-header">
<?php
echo $this->Html->link(
'Home',
array(
'controller' => 'members',
'action' => 'index',
)
);
?>
</li>
<li id="sidebar-header">
<?php
echo $this->Html->link(
'Messages',
array(
'controller' => 'members',
'action' => 'messages',
)
);
?>
</li>
<li id="sidebar-header">Misc</li>
<li>
<?php
echo $this->Html->link(
'Received Documents',
array(
'controller' => 'members',
'action' => 'documents',
)
);
?>
</li>
<li id="sidebar-header">
<?php
echo $this->Html->link(
'Calendar',
array(
'controller' => 'calendars',
'action' => 'calendar',
)
);
?>
</li>
<li>
<?php
echo $this->Html->link(
'Manage Events',
array(
'controller' => 'events',
'action' => 'manage',
)
);
?>
</li>
<li id="sidebar-header">
<?php
echo $this->Html->link(
'Reports',
array(
'controller' => 'reports',
'action' => 'index',
)
);
?>
</li>
<center><hr class="item-divider"></center>
<li id="sidebar-header">
<?php
echo $this->Html->link(
'Manage Accounts',
array(
'controller' => 'members',
'action' => 'manage_accounts',
)
);
?>
</li>
<li id="sidebar-header">
<?php
echo $this->Html->link(
'Logout',
array(
'controller' => 'user',
'action' => 'logout',
)
);
?>
</li>
</ul>
</div>
</div>
-
-
- 杂项
-
-
-
-
-
-
所以我有一个链接名“Reports”,可以打开ReportsManager插件。到目前为止,我还不知道如何访问它
我试过这个:
<li id="sidebar-header">
<?php
echo $this->Html->link(
'Reports',
array(
'controller' => 'report_manager/reports',
'action' => 'index',
)
);
?>
</li>
它可以工作,但单击其他链接后,您将在url上看到:“localhost/AppName/report\u manager/members/documents”
有什么办法可以解决这个问题吗?添加'plugin'=>'plugin NAME HERE'
<li id="sidebar-header">
<?php
echo $this->Html->link(
'Reports',
array(
'plugin' => 'report_manager',
'controller' => 'reports',
'action' => 'index',
)
);
?>
其他链接'plugin'=>false
<?php
echo $this->Html->link(
'Home',
array(
'plugin' => false,
'controller' => 'members',
'action' => 'index',
)
);
?>
就是这样!非常感谢。