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,
Could you please try to put the * object at the top?
<img src="https://i.ibb.co/hVhp2xy/image.png" alt="image" border="0">
Thanks
This is my original "array".
<img src="https://ibb.co/r7cH4CP" />
Alla fine io ho modificato questa funzione perché non riusciva a prendere le pagine quando dovevo editare qualche pagina.
<img src="https://ibb.co/wK8K1Pg" />
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
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",
),
),
),