Welcome Guest, Not a member yet? Register   Sign In
Best Way To Add Sitemap
#6

i'm using codeigniter with the sitemap php Library. Its awesome and has clear directions: https://github.com/evert/sitemap-php

To get you started - Put the SitemapPHP folder in application/libraries
Then, in your controller, in your method you call the library like:

 
PHP Code:
public function makeSitemap()
{

       // APPPATH will automatically figure out the correct path
       include APPPATH.'libraries/SitemapPHP/Sitemap.php';

       // your website url
       $sitemap = new Sitemap('http://yourwebsite.com');

       // This will also need to be set by you. 
       // the full server path to the sitemap folder 
       $sitemap->setPath('/home/username/public_html/sitemap/');

       // the name of the file that is being written to
       $sitemap->setFilename('mysitemap');

       // etc etc etc 


Reply


Messages In This Thread
Best Way To Add Sitemap - by bradm - 07-09-2015, 09:06 PM
RE: Best Way To Add Sitemap - by ivantcholakov - 07-10-2015, 06:28 AM
RE: Best Way To Add Sitemap - by edoramedia - 07-12-2015, 10:59 PM
RE: Best Way To Add Sitemap - by arma7x - 07-13-2015, 12:24 AM
RE: Best Way To Add Sitemap - by fcodebue - 12-05-2016, 12:25 PM
RE: Best Way To Add Sitemap - by cartalot - 12-05-2016, 05:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB