Skip to content
A simple sitemap generator for CodeIgniter
Branch: master
Clone or download
Damianoff updated Sitemap class
- ports from laravel-sitemap
Latest commit 726acf8 Jan 6, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
libraries updated Sitemap class Jan 6, 2016
views/sitemap updated views Dec 6, 2015
.gitignore added .gitignore Dec 6, 2015
license.txt updated license Dec 4, 2015 updated readme Jan 6, 2016

ci-sitemap library

A simple sitemap generator for CodeIgniter.


To install just copy/paste the content of ci-sitemap in your application folder.


public function sitemap()
    // first load the library

    // create new instance
    $sitemap = new Sitemap();

    // add items to your sitemap (url, date, priority, freq)
    $sitemap->add('http://mysite.tld/', '2012-08-25T20:10:00+02:00', '1.0', 'daily');
    $sitemap->add('http://mysite.tld/page1', '2012-08-26T22:30:00+02:00', '0.6', 'monthly');
    $sitemap->add('http://mysite.tld/page2', '2012-08-26T23:45:00+02:00', '0.9', 'weekly');

    // add multiple items with a loop
    foreach ($posts as $post)
        $sitemap->add($post->slug, $post->date, $post->priority, $post->freq);

    // show your sitemap (options: 'xml', 'google-news', 'sitemapindex' 'html', 'txt', 'ror-rss', 'ror-rdf')
You can’t perform that action at this time.