elixir - Phoenix.View.render_to_string 如何用布局渲染模板?
问题描述
模板渲染工作正常:
html = Phoenix.View.render_to_string(MyApp.BillingView, "receipt.html", %{organization: organization, transaction: transaction})
...但我想用布局渲染这个视图。我怎样才能做到这一点?
模板渲染工作正常:
html = Phoenix.View.render_to_string(MyApp.BillingView, "receipt.html", %{organization: organization, transaction: transaction})
...但我想用布局渲染这个视图。我怎样才能做到这一点?
标签: elixirphoenix-framework