Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

Breadcrumb generation in dynamic pages


I've been using metronic 8 for a long time now and I have a great time, but I have a problem with regards to Breadcrumb.

The problem is that when in Laravel I define an edit or view page for a specific model, for example a route of the type '/users/1/edit' the Breadcrumb does not appear.

I tried to modify the configuration file array 'config/gloabal/pages.php' going to a configuration like:


"users" => array(
"*" => [
"edit" => array(
"title" => "Edit User",
"view" => "users/edit/index",
"assets" => array(
"custom" => array(
"js" => array(
"js/custom/users/users.js",
),
),
),
),
]
),

but to no avail.

Has anyone found a solution to this problem?


Text formatting options
Submit

Replies (4)


Hi Nunzio Marfè,

Sorry, we have missed the issue here. Do you find the solution yet? This seems a bug, we will fix it and include it in the future update.

Thanks



Is this fixed?



Hi Nunzio,

Please try this code.


"users" => array(
"title" => "User List",

"*" => array(
"title" => "Show User",

"edit" => array(
"title" => "Edit User",
),
),
),


<img src="https://i.ibb.co/Nm5T2wM/image.png" alt="image" border="0">

Thanks



It didn't work for me, I set the menu page this way


array(
"classes" => array("item" => "menu-accordion d-none"),
"title" => "Edit Role",
"controller" => RolesController::class,
"path" => "users/roles_permissions/{role}/edit",
"bullet" => "<span class="bullet bullet-dot"></span>",
),


and the page equivalent this way

"users" => array(
"roles_permissions" => array(
"title" => "Roles & Permissions,
"view" => "users/roles_permissions/index",
"*" => [
"edit" => [
"title" => "Edit Role",
"view" => "users/roles_permissions/edit/index",
],
],
),
),


and I go create a link to dynamically go to that page based on an id like


<a href=""%20.%20theme()->getPageUrl("users/roles_permissions/"%20.%20%24role->id%20.%20"/edit/")%20.%20"" target="_blank" rel="noopener noreferrer">Role</a>


but it doesn't load either view right and neither the breadcumb with the page title.


Text formatting options
Submit
Text formatting options
Submit