![]() |
Anyone using HTMX with CI? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: Anyone using HTMX with CI? (/showthread.php?tid=86871) |
Anyone using HTMX with CI? - n2fole00 - 02-22-2023 Hi, I've recently discovered and am having fun with https://htmx.org/ I was wondering if anyone has used it in their CI projects and if so, have you organised your code in any particular way? Thanks. RE: Anyone using HTMX with CI? - datamweb - 02-22-2023 A powerful package for use in Codeigniter has been published by one of the members of Codeigniter. https://github.com/michalsn/codeigniter-htmx RE: Anyone using HTMX with CI? - n2fole00 - 02-22-2023 (02-22-2023, 11:54 AM)datamweb Wrote: A powerful package for use in Codeigniter has been published by one of the members of Codeigniter. Cool, I set up a test and tried an example from the docs, but I got this exception when accessing http://localhost/ci4/test/public/ which takes you to Home::index Code: "Call to undefined method Michalsn\CodeIgniterHtmx\View\View::fragmentEnd()" PHP Code: <h1>Welcome to CodeIgniter <?= CodeIgniter\CodeIgniter::CI_VERSION ?></h1> PHP Code: class Home extends BaseController Any idea why that is? Setup was Code: composer require michalsn/codeigniter-htmx RE: Anyone using HTMX with CI? - luckmoshy - 02-22-2023 Try this demo first https://github.com/michalsn/codeigniter-htmx-demo RE: Anyone using HTMX with CI? - Alesck - 03-15-2023 Hi, this documention is wrong : https://michalsn.github.io/codeigniter-htmx/view_fragments/ Actual "fragmentEnd" function is : PHP Code: $this->endFragment(); Github Source for this function I've submitted an issue on @michalsn repo. RE: Anyone using HTMX with CI? - SubrataJ - 03-16-2023 tell me how do I push extra cdn link to the header and footer using htmx. cause I don't wanna load all the assets on the first load. this is where I got stuck. RE: Anyone using HTMX with CI? - JohnSonandrbt - 04-17-2023 In general, it's always a good practice to structure your code in a way that promotes modularity, maintainability, and reusability. For instance, you may want to consider separating your HTML, JavaScript, and CSS code into separate files and folders, or use a modular architecture like MVC (Model-View-Controller) or MVVM (Model-View-ViewModel) to organize your code. You may also want to consider using a build tool like Webpack or Gulp to automate tasks like code minification, bundling, and transpiling. This can help optimize your code and improve the performance of your application. |