Multitenancy.Controller (multitenancy_phoenix v0.1.0)

Copy Markdown View Source

Helpers for base controllers that are also routed from theme routers.

defmodule MyAppWeb.PageController do
  use MyAppWeb, :controller
  plug :put_theme_view
end

put_theme_view/2 swaps every view (e.g. MyAppWeb.PageHTML) for the theme counterpart (Themes.Alpha.PageHTML) when the theme defines it.

Summary

Functions

Maps MyAppWeb.PageHTML to Themes.Alpha.PageHTML when it exists.

Functions

put_theme_view(conn, opts \\ [])

theme_view(theme_module, view)

Maps MyAppWeb.PageHTML to Themes.Alpha.PageHTML when it exists.