Skip to content

Document the _parent route attribute for tab-less routes - #2162

Merged
kpodemski merged 1 commit into
PrestaShop:9.xfrom
M0rgan01:Document-the-_parent-route-attribute-for-tab-less-routes
Aug 24, 2026
Merged

Document the _parent route attribute for tab-less routes#2162
kpodemski merged 1 commit into
PrestaShop:9.xfrom
M0rgan01:Document-the-_parent-route-attribute-for-tab-less-routes

Conversation

@M0rgan01

Copy link
Copy Markdown
Contributor
Questions Answers
Branch? 9.x
Description? Document the _parent route attribute for tab-less routes, see PrestaShop/PrestaShop#42139
Fixed ticket? -
Sponsor company -

@github-actions github-actions Bot added the 9.x label Aug 24, 2026
_parent: admin_foo_index
```

`_parent` names another route, typically the listing route of the same entity. When the current route has no `Tab`, the sidebar, breadcrumb, and toolbar fall back to the `Tab` of the route named in `_parent`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`_parent` names another route, typically the listing route of the same entity. When the current route has no `Tab`, the sidebar, breadcrumb, and toolbar fall back to the `Tab` of the route named in `_parent`.
`_parent` names another route, typically the listing route of the same entity. When the current route has no related `Tab` in the database, the sidebar, breadcrumb, and toolbar fall back to the `Tab` of the route named in `_parent`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

`_parent` names another route, typically the listing route of the same entity. When the current route has no `Tab`, the sidebar, breadcrumb, and toolbar fall back to the `Tab` of the route named in `_parent`.

{{% notice warning %}}
Do not add `_legacy_controller` to a route only to make the sidebar or breadcrumb work. `_legacy_controller` is reserved for controllers actually migrated from a legacy `AdminXController`: it also drives permission checks and `Link::getAdminLink()` resolution. Removing it from a migrated page breaks both. For a fully native route, use `_parent` instead. It has no effect on permissions or link generation: it's purely used for Back Office navigation rendering.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this context, what do you mean native route? Core's page? Route declared by a module? Both?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@M0rgan01
M0rgan01 force-pushed the Document-the-_parent-route-attribute-for-tab-less-routes branch from 523059b to c295e80 Compare August 24, 2026 14:53
@kpodemski
kpodemski merged commit d26c5ee into PrestaShop:9.x Aug 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants