Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

allow to select root path in tree widget when root is selectable #148

Closed
dbu opened this issue Aug 5, 2013 · 4 comments
Closed

allow to select root path in tree widget when root is selectable #148

dbu opened this issue Aug 5, 2013 · 4 comments

Comments

@dbu
Copy link
Contributor

dbu commented Aug 5, 2013

see for example todo comment in CmfRoutingBundle RouteAdmin::setRouteRoot

@danielantelo
Copy link

Jut playing around with the CmfRoutingBundle. I am trying to limit the route trees on Route and RedirectRoute forms to just show the children of the /cms/route

The following conf achieves what i want on the RedirectRoute form (lists /cms/routes), but not the Route tree (lists /cms).

# app/config/config.yml
cmf_routing:
    dynamic:
        persistence:
            phpcr:
                use_sonata_admin: auto
                content_basepath: /mstr
                admin_basepath: /cms/routes

Changing the admin_basepath to /cms/routes/ achieves the desired level on the Route form tree but breaks the RedirectRoute form tree (because of the trailing slash theres an error on the ajax call).

How come the setRouteRoot method on the RouteAdmin and RedirectRouteAdmin are different?

Saw a link to this issue on the on the RouteAdmin->setRouteRoot method, so thought i'd leave a comment.

@dbu
Copy link
Contributor Author

dbu commented Jan 12, 2015

if this issue was fixed, we could simply respect the basepath as specified. until then, we made the RouteAdmin take the parent path of what you specify (because otherwise you can't add a new route to the root). it seems for RedirectRouteAdmin, we missed to do that hack, which is not elegant.

we are not happy with the tree implementation we currently have. there is an effort to replace that with a better library, which would make this issue go away. discussion for that is in symfony-cmf/tree-browser-bundle#73 - but right now nobody is working on it as we have to focus on a few things at a time, to get things done.

@wouterj
Copy link
Contributor

wouterj commented Feb 12, 2017

This issue can be closed. In TreeBrowser 2.0, the root path is selectable.

@dbu
Copy link
Contributor Author

dbu commented Feb 12, 2017

thanks for going through these!

@dbu dbu closed this as completed Feb 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants