Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › General Discussions › Integrate admin templates with codeigniter application
Tagged: page templates
- This topic has 4 replies, 3 voices, and was last updated 3 weeks, 1 day ago by
Hitesh Chauhan.
-
AuthorPosts
-
March 2, 2022 at 2:24 pm #102925
chustisforol@hotmail.com
ParticipantHello: I am developing a web application and would like to use one of your dashboard templates. I am making the application in codeigniter, and I would like to know how to link your “admin-template” to be able to load the pages of my application from that template.
March 3, 2022 at 7:36 am #102928admin
KeymasterHi,
In the folder of an admin template, there is a file called ‘routing.js’ and a setupRouting function inside it. There you can define the routes to the different page. To learn how to define a page, you can look at some of the folders in the admin template like: “detail”. It has 4 files inside it – index.htm, template.htm, styles.css and index.js. The index.js defines scripts after the page is loaded, styles.css defines page-specific styles, index.htm defines the page’s title, template.htm defines the page’s content.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/March 3, 2022 at 5:34 pm #102929chustisforol@hotmail.com
ParticipantHello:
The big problem I run into is that I need a large number of .js files. Most of these files are contained in the “jqwidgets” folder, because they are necessary to use jqxgrid, jqxnumberinput, jqxfileupload,…
For this I use a file (metabase.php) where I include all those libraries, as follows:<script type=”text/javascript” src=”<?php echo base_url() ?>js/jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”<?php echo base_url() ?>js/jqwidgets/jqxdata.js”></script>
<script type=”text/javascript” src=”<?php echo base_url() ?>js/jqwidgets/jqxbuttons.js”></script>
<script type=”text/javascript” src=”<?php echo base_url() ?>js/jqwidgets/jqxscrollbar.js”></script>
<script type=”text/javascript” src=”<?php echo base_url() ?>js/jqwidgets/jqxgrid.js”></script>
<script type=”text/javascript” src=”<?php echo base_url() ?>js/jqwidgets/jqxgrid.selection.js”></script>
<script type=”text/javascript” src=”<?php echo base_url() ?>js/jqwidgets/jqxgrid.columnsresize.js”></script>
<script type=”text/javascript” src=”<?php echo base_url() ?>js/jqwidgets/jqxgrid.edit.js”></script>And many more files.
I load this file from the view, as follows:
<?php
$this->load->view(‘metabase’);
?>
They seem to load correctly, but for some reason the .js file that I call from routing.js (which needs all those files) gives me an error. Everything indicates that it is not loading the .js that it needs.Do I have to pass all these .js to it from routing.js itself? Isn’t there a more comfortable way to do it?
Thank you very much.
March 4, 2022 at 8:19 am #102930admin
KeymasterHi
The JS files should be configured in the routing as well. Each page has different dependencies and the configuration should be set there.
Example:
{ path: '/dashboard-2', template: './dashboard-2/template.htm', styleUrls: ['./dashboard-2/styles.css'], scriptUrls: [ '../../../smart/source/modules/smart.calendar.js', './dashboard-2/index.js' ], title: 'Dashboard 2 - ' + defaultTitle }Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/October 27, 2025 at 1:38 pm #113137Hitesh Chauhan
ParticipantThanks, Peter, for the detailed explanation — that really helps clarify how Smart UI handles routing and dependencies. I was facing a similar issue while integrating an tailwind dashboard templates with a CodeIgniter app, and your example made it clear that each page needs its JS dependencies configured directly in the routing file. It’s a bit manual but ensures cleaner separation and better control over scripts per page. I’ll try defining scriptUrls for each view in my setup instead of loading all JS globally. Appreciate the support and the great work your team continues to do with Smart UI!
-
This reply was modified 3 weeks, 1 day ago by
Hitesh Chauhan.
-
This reply was modified 3 weeks, 1 day ago by
-
AuthorPosts
- You must be logged in to reply to this topic.