Phoenix, unfortunately, does not have a built-in concept of shared templates or views, so we're going to have to make one ourself! We'll start off by creating a new view called VocialWeb.SharedView. Create lib/vocial_web/views/shared_view.ex and give it the base view code:
defmodule VocialWeb.SharedView do use VocialWeb, :viewend
Next, create a new directory under lib/vocial_web/templates called shared, and in there we're going to create _chat.html.eex. Then, in lib/vocial_web/templates/shared/_chat.html.eex, we'll just give it some dummy code:
<div> <h1>CHAT</h1></div>
Finally, we can open up lib/vocial_web/templates/poll/show.html.eex and add the following line to the bottom of our template:
<%= render(VocialWeb.SharedView, ...