extsitemap 生成网站地图

使用方法如下

$sitemap = Yii::app()->createComponent(array(
    'class'=>'此扩展的类文件位置',
    'dateFormater'=>'Y-m-d H:i:s'
));

$urlItem1 = $sitemap->createUrlItem();
$urlItem1->loc = Yii::app()->createUrl('/');//网站首页
$urlItem1->lastmod = time();
$urlItem1->priority = '1.0';
$rulItem1->changefreq = 'daily';
$sitemap->addUrlItem($urlItem1);

//添加更多
 ...
//显示
$sitemap->render();
1 0
2 followers
409 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Tags: sitemap
Developed by: 张 迪
Created on: Dec 7, 2011
Last updated: 5 years ago

Downloads

show all

Related Extensions