|
Joomla! / 管理技巧 / Eddy Chang / 週三, 28 七月 2010 10:09 |
我們在Joomla!建置的網站中,它會自動加上系統的Meta標籤,像是下面這樣的:
1
2
3
4
5
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="keywords" content="joomla, Joomla,...." />
<meta name="description" content="Joomla! 台灣的站務部落格...." />
<meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />
|
如果說為了安全性的考量(事實上Joomla!比很多系統或自己寫的安全多了~~"),不要讓別人太容易知道這個系統是Joomla!,或是要怎麼控制這些標籤,或是再加上其他的像author之類的?最簡單的方法就是加在佈景index.php的程式碼中。
佈景的index.php中需要有下面這行程式碼:
1
|
<jdoc:include type="head" />
|
下面再加入自己定義的Meta標籤:
1
2
3
4
5
6
7
8
9
10
11
|
<?php
$this->setMetaData('robots', 'ALL' );
$this->setMetaData('author','Eddy Chang');
$this->setMetaData('language','English');
$this->setMetaData('submission','http://www.joomla.com.tw');
$this->setMetaData('contact','
這個 E-mail 地址已經被防止灌水惡意程式保護,您需要啟用 Java Script 才能觀看
');
$this->setMetaData('format','text/html');
$this->setMetaData('document-classification','Website Marketing Company');
$this->setMetaData('document-distribution','Global');
$this->setGenerator('');
?>
|
當然還有很多其他的方法: 參考這篇來自官方討論區的文章。
評論: |