How to Create Dynamic Xml Sitemap in Codeigniter





A sitemap is described navigate of the website. users can easily search to navigate the site by sitemap. it is creating in the XML coding. we have given below example of how to create dynamic XML sitemap using Codeigniter. Add the below code in your controller file and Get the data from the database you want to create sitemap URL and pass it in the view file.

below step follow.

1. Create Sitemap controller file in your project folder.

Add the below code in your controller file and Get the data from the database you want to create sitemap URL and pass it in the view file.

 

2. Create sitemap view file in your project folder.

Add bellow code in this file. in this bellow code in product name wise create dynamic xml sitemap and when this code run at that time sitemap.xml file automatically uploaded on your root directory of project folder.

Leave a Reply

Your email address will not be published. Required fields are marked *