CFWheels
「ファイル」拡張子を含むクリーンな URL を使用してページを作成する方法がわかりません。
次のことができるようになりたいです。
これに当てはめると:
これらのドキュメントを読みましたが、実際の実装についてはまだ不明です。
/controllers/Product.cfc
次のようなコントローラー ( ) があるとします。
<cfcomponent extends="Controller">
<cffunction name="init">
<cfset provides("html,json,xml")>
</cffunction>
<cffunction name="index">
<cfset products = model("product").findAll(order="title")>
<cfset renderWith(products)>
</cffunction>
</cfcomponent>
ビューを実装するにはどうすればよいですか? それはすべきviews/products/index.xml.cfm
ですか?
<?xml version="1.0" encoding="UTF-8"?>
<products>
<product><!-- product data goes here --></product>
</products>
を実装するにはどうすればよいroutes.cfm
ですか?
デフォルトのweb.configも使用してい<cfset set(URLRewriting="On")>
て、config/setting.cfm
.