hi Guys,
I m using Symfony 1.4.4, Doctrine ORM with NetBeans IDE.
I have developed the sample project in symfony framework. its cool…!
Now Problem is in Routing…!
I cant use the Routing URL without Primary Key…! its shows the error…!
my routing.yml:
show_content:
url: /content/:pri_key/:module_type_slug
class: sfDoctrineRoute
options: { model: Content, type: object }
param: { module: content, action: show }
requirements:
sf_method: [get]
my URL is look like this…!
http://www.domain.com/module/pri_key/module_type_slug
What I Expect is, I need the URL without the Primary Key…! like this,
http://www.domain.com/module/module_type_slug
i change the Routing as,
show_content:
url: /content/:module_type_slug
...
...
but this shows the 404 not found error…! The following error I got…!
[B]
This request has been forwarded to a 404 error page by the action "content/show".
[/B]
My executeShow() method:
public function executeShow(sfWebRequest $request)
{
$this->template = Doctrine::getTable('Content')->find(array($request->getParameter('pri_key')));
$this->forward404Unless($this->template);
}
Guys, guide me how to get the clean URL without the Primary Key…!
Thanks in Advance Guys…!