DNArtworks CI4 Starter

Welcome, fellow developers, to DNArtworks' CodeIgniter 4.7.4 template. You may have read the instructions in README.md and I'm sure you want to start as fast as possible. Unfortunately, client requirements are growing overtime, and you may want to take care or at least take note of the following.

Favicon

When you use basic CodeIgniter4 template, it will show the default "fire" favicon in .ico. The <head> section of this page contains example of using a proper favicon in PNG format that is also preferred by Google. Easily replace the plain grey favicon.png.

Sitemap and Meta Tags

Most websites should have sitemap.xml for search engine to understand the structure. Also, meta tags like og and twitter are useful for sharing the webpage in social media.

Therefore, there are implementations that you need to be aware of, and adjust to your website:

  1. meta_header.php and MetaHeaderCell.php under app/Cells: this is the View Cell for automatically attaching the proper meta tags in each page. To use it, code <?= view_cell('MetaHeaderCell') ?> within your <head> tag. Note that for each page that implements this, it has to be configured for that page. Otherwise, an exception will occur to warn you.
  2. app/Config/Sitemap.php is the code where you configure the sitemap data. It is a associative array of:
  3. app/Controllers/Sitemap.php is the controller to show sitemap.xml. You can customize this code to add more mappings.

Closing

That's it for now.