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 8492839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:50:26+00:00 2026-06-10T22:50:26+00:00

I am using the Tree doctrine extension for a category tree and would like

  • 0

I am using the Tree doctrine extension for a category tree and would like to have routes like:

/cat/subcat1/subcat2/subcat3

I can do it defining routes like

/{cat}
/{cat}/{subcat}
/{cat}/{subcat}/{subcat2)
etc...

But is there a more elegant and general way of implementing this? A system that can accept an unlimited number of levels?

  • 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-10T22:50:27+00:00Added an answer on June 10, 2026 at 10:50 pm

    What you can do is accepting slashes in your routing parameters (for this route only). It involves that you can’t queue any other parameter as slash separator will be seen as being part of category parameter…

    So, how to manage slashes in a routing parameter :

    _hello:
        pattern: /category/{category}
        defaults: { _controller: AcmeDemoBundle:Demo:category }
        requirements:
            category: ".+"
    

    Calling /category/cat1/sub1/sub2 will call DemoController::categoryAction($category) method with ‘cat1/sub1/sub2’ as $category parameter. Just use your own code to decode !

    Code sample found on official doc : http://symfony.com/doc/2.0/cookbook/routing/slash_in_parameter.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Categories table, built with Tree architecture, using Doctrine Tree Extension and
I created a checkbox tree using jstree, and I would like to add a
I'm using Doctrine's 2 Tree-Nestedset extension with MySQL InndoDB database. The yml table schema
I created a binary classification tree using ctree. I would like each terminal node
When using NERD Tree on MacVim, I can open a file in a new
I have to build a tree using the following data which comes from a
How can I retrieve the full directory tree using SPL , possibly using RecursiveDirectoryIterator
I'm using the tree control in GWT. I have a custom widget that I
I'm using RecursiveDirectoryIterator and RecursiveIteratorIterator to build a file listing tree using code like
I have a table which implements a tree using hierarchyid column Sample data: People

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.