# HtmlHelper URL with plugin

**URL:** <https://discourse.cakephp.org/t/htmlhelper-url-with-plugin/8981>\
**Category:** Plugins\
**Tags:** release\
**Created:** [February 8, 2021, 8:41pm UTC](https://discourse.cakephp.org/t/htmlhelper-url-with-plugin/8981 "2021-02-08T20:41:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeyzorus](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@jeyzorus](https://discourse.cakephp.org/u/jeyzorus)\
**Post date:** [February 8, 2021, 8:41pm UTC](https://discourse.cakephp.org/t/htmlhelper-url-with-plugin/8981/1 "2021-02-08T20:41:18Z")

</div>

Hello,  
i’am using cakePHP 2.10.22.  
I used to build url like this:  
` $this->Html->url(array("controller"=>"Actuses","action"=>"index"))`

But when i use a plugin like this:  
`$this->Html->url(array("controller"=>"tasks","action"=>"index","plugin"=>"task_manager"))`

If i ‘click’ on the followed link i go to the index page of my plugin, but all my other link became corrupt.

So i need to transform all my other link with attribute **“plugin”=\>false**

if I have to put it on all the links that do not use plugin, why is it not done by default?

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [February 9, 2021, 4:05am UTC](https://discourse.cakephp.org/t/htmlhelper-url-with-plugin/8981/2 "2021-02-09T04:05:35Z")

</div>

I’m guessing you’re talking about URLs in menus and the like? This wouldn’t break links on your Actuses index page, for example. So, the number of links you need to add `'plugin' => false` on should be fairly small.

---

<div class="post-metadata">

**Author:** ![jeyzorus](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@jeyzorus](https://discourse.cakephp.org/u/jeyzorus)\
**Post date:** [February 9, 2021, 10:14am UTC](https://discourse.cakephp.org/t/htmlhelper-url-with-plugin/8981/3 "2021-02-09T10:14:46Z")

</div>

yes all the links of my menus.

I couldn’t modify the HtmlHelper directly to make plugin =\> false by default so as not to have any surprises?

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [February 9, 2021, 5:29pm UTC](https://discourse.cakephp.org/t/htmlhelper-url-with-plugin/8981/4 "2021-02-09T17:29:10Z")

</div>

If you did, then all of your views in your plugin would need to explicitly specify the plugin for links into themselves, which you don’t need to do right now. For example, your `Tasks/index.ctp` doesn’t currently need to mention the plugin in order to link to `tasks/view`.
