Skip to content
Permalink
Browse files

updated readme

  • Loading branch information...
Roumen Damianoff
Roumen Damianoff committed Jan 6, 2016
1 parent 84139f2 commit 1f9323341bc8dacb05f3a7aa5a2b8ed023d9097d
Showing with 3 additions and 34 deletions.
  1. +3 −34 readme.md
@@ -1,12 +1,12 @@
# [ci-sitemap](http://roumen.it/projects/ci-sitemap) library
# [ci-sitemap](https://roumen.it/projects/ci-sitemap) library

A simple sitemap generator for CodeIgniter.

## Installation

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

## Example (xml)
## Example

```php
public function sitemap()
@@ -28,38 +28,7 @@ public function sitemap()
$sitemap->add($post->slug, $post->date, $post->priority, $post->freq);
}
// show your sitemap (options: 'xml' (default), 'html', 'txt', 'ror-rss', 'ror-rdf')
// show your sitemap (options: 'xml', 'google-news', 'sitemapindex' 'html', 'txt', 'ror-rss', 'ror-rdf')
$sitemap->render('xml');
}
```

## Example (ror-rdf)

```php
public function ror-sitemap()
{
// first load the library
$this->load->library('sitemap');
// create new instance
$sitemap = new Sitemap();
// set sitemap's title and url (only for html, ror-rss and ror-rdf)
$sitemap->title = 'ROR sitemap';
$sitemap->link = 'http://domain.tld';
// add items to your sitemap (url, date, sortOrder, updatePeriod, title)
$sitemap->add('http://mysite.tld/', '2012-08-25T20:10:00+02:00', '0', 'daily', 'Some Title');
$sitemap->add('http://mysite.tld/page1', '2012-08-26T22:30:00+02:00', '1', 'monthly', 'Some Title');
$sitemap->add('http://mysite.tld/page2', '2012-08-26T23:45:00+02:00', '2', 'weekly', 'Some Title');
// 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' (default), 'html', 'txt', 'ror-rss', 'ror-rdf')
$sitemap->render('ror-rdf');
}
```

0 comments on commit 1f93233

Please sign in to comment.
You can’t perform that action at this time.