Hi! May someone helps me, please? I am trying to render a template into another template. My objective is to create a generic template with two links to log in or log out with the help of Ueberauth, and I want this template to appear in all the pages of my website.
This is the template that I have:
<section> <ul class="right"> <%= if @conn.assigns[:user] do %> <li> <%= link "Sign Out", to: auth_path(@conn, :signout) %> </li> <% else %> <li> <%= link "Google Sign In", to: auth_path(@conn, :request, "google")%> </li> <% end%> </ul> </section>
These are my templates and views files trees:
templates layouts auth auth.html.eex app.html.eex page index.html.eex views auth_view.ex error_helpers.ex error_helpers.ex error_view.ex layout_view.ex page_view.ex
I just want to know how to insert the auth.html.eex into other templates. For example, at this moment I am just trying to insert it into the index page of Phoenix (The one that appears the first time yo create a new project).
I will appreciate if someone can help me.