Anyone using HTMX with CI? |
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.
A powerful package for use in Codeigniter has been published by one of the members of Codeigniter.
https://github.com/michalsn/codeigniter-htmx (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
Try this demo first https://github.com/michalsn/codeigniter-htmx-demo
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals
Hi,
this documention is wrong : https://michalsn.github.io/codeigniter-h...fragments/ Actual "fragmentEnd" function is : PHP Code: $this->endFragment(); Github Source for this function I've submitted an issue on @michalsn repo.
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. |
Welcome Guest, Not a member yet? Register Sign In |