stein_phoenix v0.2.0 Stein.Phoenix.Views.BreadcrumbHelper View Source
Helper functions for Bootstrap 4 breadcrumbs
<%= breadcrumbs do %>
<%= breadcrumb do: link("Dashboard", to: Routes.dashboard_path(@conn, :index)) %>
<%= breadcrumb do: link("Users", to: Routes.user_path(@conn, :index)) %>
<%= breadcrumb @user.name, active: true %>
<% end %>
Link to this section Summary
Link to this section Functions
Create a breadcrumb link
You can use two versions of this. One with a do
block and the other with a plain string.
Using a string:
<%= breadcrumb "Users" %>
Using a do
block:
<%= breadcrumb do: link("Users", to: Routes.user_path(@conn, :index)) %>
No options can be passed along if you use the do
form.
Create a breadcrumb
When using this form, you can pass in active: true
to flag the
breadcrumb as the active one.
<%= breadcrumb "Users", active: true %>
Wrapper for breadcrumb/1
and breadcrumb/2
Sets up the base nav
and ol
<%= breadcrumbs do %>
<% end %>