when I want to have a "path" like this:account/annunci/4/edit
I can't get the "js" in the "config/global/pages.php" file to work
my config:
"account" => array(
"annunci" => array(
"title" => "Lista annunci",
"assets" => array(
"custom" => array(
"css" => array(
"plugins/custom/datatables/datatables.bundle.css",
),
"js" => array(
"plugins/custom/datatables/datatables.bundle.js",
),
),
),
"create" => array(
"title" => "Aggiungi Annuncio",
"assets" => array(
"custom" => array(
"css" => array(
"plugins/custom/datatables/datatables.bundle.css",
),
"js" => array(
"plugins/custom/datatables/datatables.bundle.js",
"js/custom/account/annunci/create-annuncis.js",
),
),
),
),
"*" => array(
"edit" => array(
"title" => "Modifica Annuncio",
"assets" => array(
"custom" => array(
"js" => array(
"js/custom/account/annunci/edit-annuncis.js",
),
),
),
),
),
),
Hi try putting your path inside of the asterisk. Like this.
"*" => array(
"annunci" => array(
"title" => "Lista annunci",
"assets" => array(
"custom" => array(
"css" => array(
"plugins/custom/datatables/datatables.bundle.css",
),
"js" => array(
"plugins/custom/datatables/datatables.bundle.js",
),
),
),
This is my original "array".
Alla fine io ho modificato questa funzione perché non riusciva a prendere le pagine quando dovevo editare qualche pagina.
By modifying the "getOption" function in "app/Core/Adapters/Theme.php",
it works with all levels and is read only once.
Hi Gabriele,
Thank you for the solution. We will add it as a fix.
Thanks
Hi, I'm having the same problem too, the custom JS would not load. Kindly assist me too, thank you very much