Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

How do I add Specific scripts to a dynamic page? Unable to add title, css or datatable scripts.


I have a page that pulls from the user ID, But I cannot set a title or add script to that page.
The endpoint is the following: domain.com/customers/{id}/projects

BUT I cannot set scripts or title from the Pages.php in config folder. Currently looks like this:

'customers' => array(
'title' => 'Customers',
'layout' => array(
'page-title' => array(
'description' => true,
'breadcrumb' => false,
),
),

'projects' => array(
'title' => 'Customer Projects',
'view' => 'customers/projects',
'assets' => array(
'custom' => array(
'css' => array(
'plugins/custom/datatables/datatables.bundle.css',
),
'js' => array(
'plugins/custom/datatables/datatables.bundle.js',
),
),
),
),

'assets' => array(
'custom' => array(
'css' => array(
'plugins/custom/datatables/datatables.bundle.css',
),
'js' => array(
'plugins/custom/datatables/datatables.bundle.js',
),
),
),
),


Any suggestions why?


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi Kenneth Flores,

Could you please try this code as config?


"customers" => array(
"title" => "Customers",
//...
"*" => array(
//...
"title" => "Customer Projects",
),
),


Thanks


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(