Skip to content

Commit

Permalink
Шаблон sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
visavi committed Dec 8, 2016
1 parent 77b0e64 commit 56a4134
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/modules/pages/sitemap.php
@@ -1,3 +1,15 @@
<?php

echo 'Это sitemap';
/**
* Генерируем блоги
*/

/**
* Генерируем новости
*/

/**
* Генерируем события
*/

App::view('sitemap');
34 changes: 34 additions & 0 deletions app/views/sitemap.blade.php
@@ -0,0 +1,34 @@
<?php header("Content-type:application/rss+xml; charset=utf-8"); ?>
<?= '<?xml version="1.0" encoding="utf-8"?>' ?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>
<loc>{{ App::setting('home') }}/</loc>
<lastmod>2005-01-01</lastmod> - дата сканирования, хранить в настройках
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>

<url>
<loc>http://www.example.com/catalog?item=12&amp;desc=vacation_hawaii</loc>
<changefreq>weekly</changefreq>
</url>

<url>
<loc>http://www.example.com/catalog?item=73&amp;desc=vacation_new_zealand</loc>
<lastmod>2004-12-23</lastmod>
<changefreq>weekly</changefreq>
</url>

<url>
<loc>http://www.example.com/catalog?item=74&amp;desc=vacation_newfoundland</loc>
<lastmod>2004-12-23T18:00:15+00:00</lastmod>
<priority>0.3</priority>
</url>

<url>
<loc>http://www.example.com/catalog?item=83&amp;desc=vacation_usa</loc>
<lastmod>2004-11-23</lastmod>
</url>
</urlset>

0 comments on commit 56a4134

Please sign in to comment.