I made two List actions. One actually corresponds to the default _new action and other is slightly different. So in generator.yml, I put:
list:
max_per_page: 10
title: All Posters
display: [approved, name, user_id, _web_path, created_at]
actions:
upload : #this is actually equivalent to _new.
credentials: create_poster
label: "Upload Poster"
action: new
create :
credentials: create_poster
label: "Create Poster"
Now in my list view, I can see two links for these two actions but the create Link links to /poster/ListCreate/action instead of /poster/ListCreate. What can be a reason for that? I'm also pasting the _list_actions.php file in the cache.
<li class="sf_admin_action_upload">
<?php if ($sf_user->hasCredential('create_poster')): ?>
<?php echo link_to(__('Upload Poster', array(), 'messages'), 'poster/new', array()) ?>
<?php endif; ?>
</li>
<li class="sf_admin_action_create">
<?php if ($sf_user->hasCredential('create_poster')): ?>
<?php echo link_to(__('Create Poster', array(), 'messages'), 'poster/create', array()) ?>
<?php endif; ?>
</li>
Adding a custom action:
list:
actions:
myaction:
label: "My action"
action: myaction
you have to write a routing rule to have the behavior you are looking for:
myaction:
url: /mymodule/myaction
param: { module: mymodule, action: myaction }