I am new to Magento, I need to pass parameters to a cms page created through the backend under the cms section. The steps I followed to create a page are as follows:

  1. First of all, I added a new page layout using this answer.
  2. Then I added a new page from admin panel, and added the layout created in the previous step to this page.
  3. The page is created and I can access it using the url-key (custom-products) generated for this page, as example.com/custom-products The page content is loaded successfully.

Now my problem is, i want to pass a parameter to this url just like example.com/custom-products/1, but when I write /1 at the end of the url, It takes me to the Not found page.

But when I add a query-string parameters (example.com/custom-products?param=1) to this page the page works fine. But I don't want the parameter passed as query-string. I need it to be as example.com/custom-products/1

Any help in this regard would be really appreciating.

Bundle of thanks in advance.

  • What is the param /1 for? You could add this to your CMS page url key, but i doubt thats what you're looking for.
    – sv3n
    Commented Jun 11, 2017 at 0:07
  • param /1 is not a static number, it is a dynamic number, which gets value from the previous page
    – HMUS
    Commented Jun 11, 2017 at 0:15
  • OK, what should the parameter do? Just ask because i think a (static) CMS page is not for displaying dymanic content. Maybe you can update your answer and tell what you try to achieve in the end.
    – sv3n
    Commented Jun 11, 2017 at 0:23

2 Answers 2


You can't use following type of url for cms page




Because CMS Router class take whole things as an identifier. In example it's create identifier for url like




But when you create CMS page, you assign identifier 'custom-products' not custom-products/1 or custom-products/param/1, That's why it load nothing. Check following class


 * Validate and Match Cms Page and modify request
 * @param Zend_Controller_Request_Http $request
 * @return bool
public function match(Zend_Controller_Request_Http $request)
    if (!Mage::isInstalled()) {

    $identifier = trim($request->getPathInfo(), '/');

    $condition = new Varien_Object(array(
        'identifier' => $identifier,
        'continue'   => true
    Mage::dispatchEvent('cms_controller_router_match_before', array(
        'router'    => $this,
        'condition' => $condition
    $identifier = $condition->getIdentifier();

    if ($condition->getRedirectUrl()) {
        return true;

    if (!$condition->getContinue()) {
        return false;

    $page   = Mage::getModel('cms/page');
    $pageId = $page->checkIdentifier($identifier, Mage::app()->getStore()->getId());
    if (!$pageId) {
        return false;

        ->setParam('page_id', $pageId);

    return true;

Check following line

$page   = Mage::getModel('cms/page');
$pageId = $page->checkIdentifier($identifier, Mage::app()->getStore()->getId());
if (!$pageId) {
    return false;

How to overcome?

Create your own router and make your own way.

How you create Router?

You use an example of CMS module. Open config.xml and check following code sample


Create your router class like Vendor_Module_Controller_Router.


can you try like that


you are not passed parameter (param) field in the url.

  • if it is work please let me know Commented Jun 11, 2017 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.