Question: I have two template folder in my web/templates folder:

```
> ls web/templates
personal_info       user

```

What I want is to render some template from `user` folder in another view of `personal_info`. so I have a file at path: `web/templates/personal_info/index.html.eex`, I have following content:

```
<%= render "user/xyz.html" %>

```

But I get following error:

```
[error] #PID<0.821.0> running MyApp.Endpoint terminated
Server: localhost:4000 (http)
Request: GET /
** (exit) an exception was raised:
    ** (Phoenix.Template.UndefinedError) Could not render "user/xyz.html" for MyApp.PersonalInfoView, please define a matching clause for render/1 or define a template at "web/templates/personal_info". The following templates were compiled:

* index.html

```

Please tell me how do I render template defined in other folder, I tried few permutations, but none worked.

Answer: 
As of Phoenix `1.5.1`

Phoenix matches controllers, views, and templates by names. It can be changed by [put\_view](https://hexdocs.pm/phoenix/Phoenix.Controller.html#put_view/2) like:

```
conn
  |> put_view(MyAppWeb.SpecialView)
  |> render(:show, message: "Hello")

```

<https://hexdocs.pm/phoenix/Phoenix.Controller.html#render/3-views>
Apparently following worked:

```
<%=  Phoenix.View.render(MyApp.UserView, "xyz.html") %>

```

please let me know, If there are better alternatives.

Source: [this](http://www.phoenixframework.org/v0.7.2/docs/templates#section-shared-partials).