比方說,我使用自定義控制器有Magento的路由器地址 - 需要Hyphnated路徑名
/customcategory
好一個URL路徑/前端的名字,很明顯,如果我有一個名爲「TestController.php」控制器文件,的indexAction URL路徑將
/customcategory/test/index
什麼,我想弄清楚是怎麼做重新命名該測試控制器,或者修改配置xml文件,所以我可以從控制文件中的連字符的URL如
/customcategory/test-section/index
我知道如果我想/customcategory
被連字符連接,我可以在配置文件中修改前端標籤。但是我正在構建的網站將受益於連字符控制器路線,這是/customcategory
帶有關鍵字後的部分,我無法使其工作,也無法在Google上找到示例 - 就像看起來那麼瘋狂。
謝謝你的時間。
你是不是想有以下結構的網址... XYZ .com/customcategory/what-ever-hyphnated-path-i-want.html ... xyz.com/customcategory/hyphnated-path-2.html ... etc? –
是的。因此,無論我在自定義控制器中使用哪個控制器文件,我都可以完全控制該路徑。 – Joel
查看「產品標籤」部分,讓我知道這是您試圖完成的任務http://www.contempospace.com/bedroom-furniture/wardrobe-closets/custom-closet-systems/isa-closet -system-shelves-hanging-walk-in-reach-in-closet.html –