title: What is wrong with this route?
body: <p>Hey.
  I was going to make a "current" class for my menu component, that creates the menus. To find out the current class, it was suggested to use <code>$this>getContext()->getRouting()->getCurrentRouteName();</code>. To do this, I had to set up routes for all the menu-elements that was going to exist.</p>
  
  <p>Lets say I have two elements so far, one for the frontpage, one for the customer. Whenever I am browsing the frontpage, matter what action and parameters, I would like the above code to return "frontpage". Same goes for customer.</p>
  
  <p>My rule for customer now, is the following:
  routing.yml</p>
  
  <pre>
  customer:
    param: { module: customer }
  </pre>
  
  <p>I thought that setting up the url was not important, I have already specified the module to be customer. The menu element should have "current" class no matter the action used.</p>
  
  <p>How I link:</p>
  
  <pre>
  if ($current == $name){
      echo link_to($name, $link, array("class" => "selected"));
  }else {
      echo link_to($name, $link);
  }
  </pre>
  
  <p>Links ($link) that now go to "customer/some_action" does not work, they show up as just "/". So I thought to use url_for around the $link, that didn't work either, same result.</p>
  
  <p>There must be something wrong with my routing rules... Because when I enter lets say /customer/new manually, I can see the page. If I from the template write out <code>$this>getContext()->getRouting()->getCurrentRouteName();</code>, it says default. So my rule definitely does not work at all. I've tried other rules too, but haven't got anyone working. The trick is to make one rule that works for anything under the module customer..</p>
  
  <p>And yes, I clear my cache after changing each of my rules.</p>
  
  <p>Thanks a lot.</p>
  
  <p>EDIT:
  I made the routing rules work, but not for all actions under the customer module. I have to make rules for each action. But, the links are still broken, they show "/".</p>
  
  <p>My new rules:</p>
  
  <pre>
  customer_index:
    url:   /:module
    param: { module: customer, action: index }
  
  customer_new:
    url:   /:module/:action
    param: { module: customer, action: new }
  </pre>
  
  <p>None of these links works:
  <code>echo link_to("Customers", "@customer_index", array("module" => "customer"));</code></p>
  
  <p><code>echo link_to("New customer", "@customer_new", array("module" => "customer"));</code></p>