I am trying to create a list action in the admin generator.
I have the following in my generator.yml file:
......
list:
title: Sales
actions: { _export: ~ }
display: [=id, created_at]
So I have the export action in my actions.class.php
public function executeList_export(sfWebRequest $request)
{
}
And I have a template named: List_exportSuccess.php
The problem is, when I click the export link, I get: Empty module and/or action after parsing the URL "/sales/List_export/action" (/).
Am i naming these files/methods correctly?
Thanks
EDIT:
routing.yml
sales:
class: sfDoctrineRouteCollection
options:
model: sales
module: sales
prefix_path: /sales
column: id
with_wildcard_routes: true
homepage:
url: /
param: { module: dash, action: index }
sf_guard_signin:
url: /login
param: { module: sfGuardAuth, action: signin }
sf_guard_signout:
url: /logout
param: { module: sfGuardAuth, action: signout }
sf_guard_password:
url: /request_password
param: { module: sfGuardAuth, action: password }
ok. There’s your problem. Add this to the very end of your routing.yml
or create a specific route for that action (which I don’t recommend)