in the new setup with components accessed from a controller
from the docs Components and HEEx Templates — Phoenix v1.7.0-rc.0
Phoenix assumes a strong naming convention from controllers to views to the templates they render.
PageController requires a
PageHTML to render templates in the
With all this setup alias declared in page_html.ex are not seen inside the page_html/* templates.
if completely prefixed inside embedded templates, all is ok, but with aliases placed in the page_html.ex it does not work
def controller do
use Phoenix.Controller, namespace: AppWeb,
formats: [:html, :json, :xlsx, :pdf],
layouts: [html: AppWeb.Layouts]
import Plug.Conn end
the app was converted from 1.6 and views.
While in a newly generated app aliases are seen, it’s not he case in this converted app.
I was wondering what could cause that since the template is reached and the page is shown ok if not using aliases