# Set rout for default.ctp

**URL:** https://discourse.cakephp.org/t/set-rout-for-default-ctp/3288
**Category:** Uncategorized
**Created:** [September 27, 2017, 3:56pm UTC](https://discourse.cakephp.org/t/set-rout-for-default-ctp/3288 "2017-09-27T15:56:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mohsnsfrz](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@mohsnsfrz](https://discourse.cakephp.org/u/mohsnsfrz)
#### Post date: [September 27, 2017, 3:56pm UTC](https://discourse.cakephp.org/t/set-rout-for-default-ctp/3288/1 "2017-09-27T15:56:56Z")

</div>

Hi  
i am new to cakephp. i want to use two controllers in my default.ctp but i could not find out how to do it. in other words i want to use ArticlesController to save articles and also a MessagesController to get messages from users. i want to use these two controllers in my default.ctp. how can i do this?

---

<div class="post-metadata">

### Author: ![rrd](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/rrd/32/113_2.png) [@rrd](https://discourse.cakephp.org/u/rrd)
#### Post date: [September 27, 2017, 4:40pm UTC](https://discourse.cakephp.org/t/set-rout-for-default-ctp/3288/2 "2017-09-27T16:40:16Z")

</div>

`default.ctp` is the core template, what is used to display for all your actions. It should not contain any controller related variables.

Do you want to display these in a header? Or do you speak about the opening page of your application?

---

<div class="post-metadata">

### Author: ![mohsnsfrz](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@mohsnsfrz](https://discourse.cakephp.org/u/mohsnsfrz)
#### Post date: [September 27, 2017, 5:11pm UTC](https://discourse.cakephp.org/t/set-rout-for-default-ctp/3288/3 "2017-09-27T17:11:16Z")

</div>

i’m speaking about the opening page of my application. i have an add action in ArticlesController that i placed a form for it in default.ctp and it works. i also want to have a form for MessagesController in my default.ctp to get messages. you said it’s the core template and should not contain any controller related variables. you mean it’s not secure to have a from in there? because i prefer my application to be user-friendly and users be able to do what they want in the homepage and don’t need more clicks

---

<div class="post-metadata">

### Author: ![rrd](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/rrd/32/113_2.png) [@rrd](https://discourse.cakephp.org/u/rrd)
#### Post date: [September 27, 2017, 6:57pm UTC](https://discourse.cakephp.org/t/set-rout-for-default-ctp/3288/4 "2017-09-27T18:57:41Z")

</div>

You may consider using cells

[https://book.cakephp.org/3.0/en/views/cells.html](https://book.cakephp.org/3.0/en/views/cells.html)
