http://mydomain.com/sitemap.xmlで次の XML を表示するように CFWheels を構成するにはどうすればよいですか?
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<-- I'll add the <url> tags dynamically here later -->
</urlset>
ファイルから「sitemap.xml」を削除しましたweb.config
。
controller
この後、 andの作成についてどうすればよいかわかりませんview
。「views」フォルダーに「sitemap.xml」フォルダーを作成し、「index.cfm」ファイルを追加してから、上記の XML を追加する必要がありますか?
「controllers」フォルダに「sitemap.xml.cfc」ファイルを作成する必要がありますか? そして、コントローラーファイルには何を含める必要がありますか?
それはこのように見えるべきですか?
<cfcomponent extends="Controller" output="false">
<cfscript>
function init(){
// Let CFWheels know what type of output this controller can 'provide'
provides("xml");
}
function index(){
}
</cfscript>
</cfcomponent>
routes.cfm にエントリを追加する必要がありますか?