Breadcrumbs - How To ?:
Hi All,
I'm just trying to figure out where:
I'm just trying to figure out where:
- breadcrumb
- title
Come from in the below code, I've setup a new model and trying to get breadcrumb and title to work but I can't find where this is actually coming from ?
There doesn't seem to be anything in the Accounts Controller that actually sets this ?
# views/accounts/new.html.erb
<div class="flex flex-wrap my-4 lg:px-4"> <div class="lg:w-1/4 w-full p-4"> <%= render partial: "shared/account_navbar" %> </div> <div class="lg:w-3/4 w-full p-4"> <div class="text-sm text-gray-600 mb-5"> <%= link_to t("accounts.all"), accounts_path, class: "hover:text-black" %> <%= render_svg "icons/cheveron-right", styles: "fill-current icon-sm text-gray-600 inline-block" %> <%= t(".breadcrumb") %> </div> <div class="lg:p-10 p-4 bg-white rounded-lg border border-gray-300"> <h1><%= t(".title") %></h1> <%= render 'form', account: @account %> <%= link_to t("back"), accounts_path %> </div> </div> </div>
look for "breadcrumb' in the config/locales/en.yml file (or similar). It's a localization file. the keys in the .yml file are tied to the controllers/actions so there are variables set specifically for it.
a snippet:
the specific one you're referring to is for the "accounts" controller, and the "new" action. It sets a variable named "breadcrumb" which should have a value of "New Account". However in your screenshot, it looks like the values are incorrect. Since it's not erroring, my first guess is the en.yml has been modified
a snippet:
the specific one you're referring to is for the "accounts" controller, and the "new" action. It sets a variable named "breadcrumb" which should have a value of "New Account". However in your screenshot, it looks like the values are incorrect. Since it's not erroring, my first guess is the en.yml has been modified
Notifications
You’re not receiving notifications from this thread.