lars.schwarz
lars.schwarz

Reputation: 1274

Add custom (parameter) route to an existing Magento CMS Page

I need to add an URL parameter to an existing CMS page. I basically created a categories overview page by creating a CMS page with the URL /artists (in my setup artists are equal to Magento's categories).

Now I need to create a custom/parameter route since I need a category-detail-page.

Example: fooshop.com/artists/artistname

where /artists lists all existing artists (categories) and /artists/artistname just shows one artist (detail) page.

One way to do so would be creating a simple URL rewrite (htaccess) to map all requests to /artists/someparameter to /artists/ but I was wondering if there's a more elegant solution by using Magento's default controller/view structure?

Upvotes: 1

Views: 315

Answers (1)

lars.schwarz
lars.schwarz

Reputation: 1274

I ended up in writing a custom module that uses a custom controller that extends Mage_Core_Controller_Varien_Router_Abstract.

Upvotes: 1

Related Questions