Skip to content

Code Definitions

raideer edited this page Apr 19, 2026 · 4 revisions

XML Class hover & jump-to-definition

Magento Toolbox provides class and interface definitions and hover info inside XML files.

image

You can jump to the target class or interface by Ctrl clicking or right-clicking -> Go to Definition

Module jump-to-defininition

Magento Toolbox provides definitions for Magento module names in module.xml and routes.xml files. Ctrl click the module name or right-click -> Go to Definition

image

ACL jump-to-definition

Ctrl click the ACL ID or right-click -> Go to Definition

Theme jump-to-definition

Ctrl click the parent theme id in theme.xml to jump to the parent theme's declaration.

Controlled by setting: magento-toolbox.provideThemeDefinitions

Layout & page_layout jump-to-definition

Ctrl click any of the following in layout/*.xml or page_layout/*.xml files to jump to the declaring element:

  • <referenceBlock name="..."> → the original <block name="..."> declaration. Falls back to a container with the same name if no block exists (Magento's runtime does not distinguish).
  • <referenceContainer name="..."> → the original <container name="..."> declaration. Falls back to a block with the same name.
  • <update handle="..."> → every layout file with that handle across modules and themes.
  • <move element="..."> → the referenced block or container declaration.
  • <move destination="..."> → the referenced block or container declaration.

Lookups are area-scoped: frontend files see frontend + base, adminhtml files see adminhtml + base. Results are merged from both layout/ and page_layout/ indexes.

Controlled by setting: magento-toolbox.provideLayoutDefinitions

Layout & page_layout hovers

Hovering the same attributes listed above shows a summary — theme, class, container label, htmlTag, declaring files, and direct links to the declarations.

Find All References and Rename for layout symbols

Right-click any <block name>, <container name>, <referenceBlock name>, <referenceContainer name>, <move element>, <move destination>, or <update handle> and use Find All References or Rename Symbol (F2):

  • Rename updates every occurrence across layout/*.xml and page_layout/*.xml files in the current area (frontend vs adminhtml are independent).
  • Handles support Find All References; renaming a handle is disabled (it would require renaming the XML file itself).

Clone this wiki locally