Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8574641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:31:10+00:00 2026-06-11T19:31:10+00:00

How can I generate link to another module in Symfony admin generator Yaml? I

  • 0

How can I generate link to another module in Symfony admin generator Yaml?
I am trying to link from sfGuardUser module (user list) to profile/viewProfilesDetails but it always points to sfGuardUser/viewProfilesDetails

My generator.yml :

(...)
  list:
    title:   Użytkownicy
    display: [=username, _name, created_at, last_login]
    actions: {}
    batch_actions: {}
    object_actions:
      _edit: ~
      signIn:
        label:  Zaloguj jako
        action: signIn
      viewProfiles:
        label:  Profile
        module: profiles
        action: viewProfilesDetails
(...)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:31:11+00:00Added an answer on June 11, 2026 at 7:31 pm

    I don’t think you can specify a module in this configuration, but only an action from the same module.

    I personnaly do this in this way.

    generator.yml :

    object_actions:
      _edit: ~
      _delete: ~
      viewItems: { label: View items, action: viewItems }
    

    Then in the same module for the generator.yml, I create an action:

    public function executeViewItems($request)
    {
      $this->redirect($this->generateUrl('items'));
    }
    

    It generates a link called View items, like /blog/158/viewItems which redirect to the /items (which is the route @items).

    Edit:

    In fact, you can’t specify an other module.

    The template _list_td_actions.php display list.object_actions. Here is the interesting part:

    <?php else: ?>
        <li class="sf_admin_action_<?php echo $params['class_suffix'] ?>">
          <?php echo $this->addCredentialCondition($this->getLinkToAction($name, $params, true), $params) ?>
        </li>
    <?php endif; ?>
    

    It calls the getLinkToAction which use the current module by using $this->getModuleName():

    return '[?php echo link_to(
      __(\''.$params['label'].'\', array(), \''.$this->getI18nCatalogue().'\'), 
      \''.$this->getModuleName().'/'.$action.$url_params.', 
      '.$this->asPhp($params['params']).'
    ) ?]';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know you can generate all permutations from a list, using glob or Algorithm::Permute
I need to hide a link to the user so that he can't click
I can generate my models and schema.yml file based on an existing database. But
ASP.NET MVC 3 can generate scaffold code for us(controllers and views). The generated views
I found jquery can generate file tree structure based on existing folders and files
ASP.NET MVC can generate HTML elements using HTML Helpers, for example @Html.ActionLink() , @Html.BeginForm()
Does anyone know a C# framework that can generate public/private keys, X.509 certificates and
I'm wondering if i can generate a scaffold without getting that annyoing s after
I want to create an XSD which can generate the following XML. <note> <email:to>abc@def.com</email:to>
In a pure C++ world we can generate interfacing or glue code between different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.