The plugin resolves template paths along the cartridge path, as the server does. Every template value is a link, a template's first line shows who renders and includes it, and overridden copies point to each other
template path is a link that follows the linked cartridges. The gutter icon of <isdecorate> lists each copy of the decorator, and Cmd+Click on an include opens the templateTemplate links
Cmd+Click (Ctrl+Click) or Go to Declaration (Cmd+B, Ctrl+B) on the template value of <isinclude>, <isdecorate> or <ismodule> opens the template. The same works in scripts, for example on res.render('product/productDetails')
| Rule | What it means |
|---|---|
| Paths are normalized | A leading / or ./ and .isml don't matter: /product/tile.isml and product/tile are the same template |
| Case-sensitive | Product/Tile doesn't find product/tile.isml. The inspection names the likely file |
| Locale folders | default first, then the other locale folders by name |
| Cartridge order | Paths resolve through the linked cartridges. Template target in the ISML settings picks which copy opens |
| Dynamic paths | A path with ${...} is a pattern, so matching templates count it in Included by, Rendered by and Find Usages |
When a path exists in several cartridges, the click opens the copy that wins and Go to Implementation (Cmd+Alt+B, Ctrl+Alt+B) lists every copy
Other ISML values link too:
- route names, for example
<iscomponent pipeline="Product-Tile">andURLUtils.url('Cart-Show') - slot and content asset ids in
<isslot id>and<iscontentasset aid> - static files in
URLUtils.staticURL('/images/logo.svg'),assets.addJs()andassets.addCss() - resource bundles and keys in
Resource.msg('button.addtocart', 'common', null)
A value that opens something gets a thin grey underline, as a link does, and only while it has a target, so a path that resolves nowhere gets none. The color is Clickable path, route or key (underline) under Attributes in Settings › Editor › Color Scheme › ISML
Content links in attribute values, such as href="$url('Search-Show','cgid','mens')$" or src="images/logo.svg?$staticlink$", complete and open the route, the ID or the static file too, see Content links
Gutter icons
| Icon | Where | Tooltip | Click |
|---|---|---|---|
<isinclude template> | Includes product/components/breadcrumbs, or Includes a template chosen at run time for a path with ${...} | Opens the template, or a Choose Template list when it exists in several cartridges or the path matches several templates | |
<isinclude url> | Remote include of Tile-Show | Opens the controller of the route in URLUtils.url(), or a Choose Route list | |
<isdecorate> and <ismodule> | Navigate to template (2 cartridges) | Opens the template, or lists each copy | |
| First line | Rendered by Search.js, Tile.js | Lists the controllers, scripts and pipelines whose render calls or interaction nodes pick this copy | |
| First line | Included by productGrid.isml, wishlistGrid.isml +2 | Lists the templates that include, decorate with or declare this copy as a custom tag | |
| First line | Overrides product/productTile in app_storefront_base | Opens the copies this one hides | |
| First line | Overridden by app_custom; app_custom renders | Opens the copies that hide this one | |
<isreplace/> in a decorator | Decorates productDetails.isml, cart.isml +4 | Lists the templates that decorate with this one | |
<isdecorate> | Decorated by app_storefront_base/cartridge/templates/default/common/layout/page.isml | Opens the decorator at its <isreplace/> | |
name of <ismodule> | <isloyaltybadge> is used in 3 templates | Lists the templates that use the custom tag | |
A custom tag such as <isloyaltybadge>, off by default | Open the template of <isloyaltybadge> | Opens the module template |
Only paths that resolve to this exact copy count, so an overridden copy has no Rendered by icon. Turn icons off in Settings › Editor › General › Gutter Icons
Code Vision
In the ISML group of Settings › Editor › Inlay Hints › Code vision
| Entry | Where | Click |
|---|---|---|
| 6 usages | Above the first line | Find Usages for the template: render calls, includes, decorators and custom tag declarations |
| Rendered by Search.js, Tile.js | Above the first line | Opens the script or pipeline, or lists them when there are several |
| 12 usages | Above each <ismodule> | Lists the templates that use the custom tag, see Custom Tags |
| 5 decorated templates | Above <isreplace/> | Lists the templates that decorate with this one |
Template Graph
Show Template Graph on the editor's floating toolbar opens a graph of the template in a new tab, such as productDetails.isml Graph. It shows the controllers, scripts and pipelines that render the template, the templates that use it, and every template it includes, decorates with or calls as a custom tag. The action is also in Find Action
Each cartridge of the selected site's cartridge path gets a column, in path order, so you see which copy of a path renders. The template itself has a blue border. Lines run from the file that uses another to the file it uses:
| Line | Means | Label |
|---|---|---|
| Purple, Renders | A render call in a controller or script, or a pipeline node that renders the template | The routes |
| Grey, Includes | <isinclude template> | |
| Green, Decorates | <isdecorate> | |
| Amber, Custom tag | A custom tag declared with <ismodule> | The tag, such as isloyaltybadge |
| Grey dashed, Chosen at run time | An include whose path has ${...} | The pattern |
| Blue dotted, Remote include | <isinclude url>, to the route it calls |
- Trails: hover a file, or select one, to light its lines and every way between it and the template. The rest fades
- Details: the panel on the right lists the selected file's Paths from where they begin to where they end, then the files it's Used by and Uses. Hover a row to light its way, and double-click it or press
Enterto open the file. Show Details hides the panel - Search: Find a file, route or tag matches names, paths, cartridges and the routes and tags of a file's lines, so a controller is found by its route.
Enteror the arrows go to the next match - Focus: Show Only Paths Through the Selected File , or Show Only Its Paths in the panel, keeps only the ways through one file
- Moving around: the wheel or a pinch zooms,
Shiftwith the wheel or a two-finger swipe scrolls, and dragging the background pans. Fit Graph shows it all, Center on Template goes back to the template, andEscapeselects the template again - Opening files: double-click a file or press
Enterto open it where it renders the template. Show Graph of This Template opens another template's graph
A large graph keeps the nearest files on each side and says so in a notice. The graph covers templates of linked cartridges, with an active license
Overrides
A copy further left on the cartridge path hides the same path further right. Opening a hidden copy shows a banner:
This template is overridden by app_custom, so app_custom renders product/productTile
Open override opens the copy that renders, Compare opens both in a diff and Dismiss hides the banner for this file. A template in a cartridge that the selected site doesn't run gets a different banner:
This cartridge is not on the cartridge path of the selected site AcmeUS, so product/productTile never renders there; it is on the cartridge path of AcmeCA, AcmeEU and 2 more
4 sites use it lists those sites, and picking one makes it the site scope. Switch site opens B2C Site Scopes, and Dismiss hides the banner for this file. With no site selected, it reads "This cartridge is not on the cartridge path, so product/productTile never renders from here". See Which sites use a cartridge
- Go to Super (
Cmd+U,Ctrl+U) opens the copy this one overrides - When two open templates share a name, the editor tab adds the cartridge, and the locale of a locale copy, as in
productTile.isml [app_custom]orproductTile.isml [app_custom, ja_JP] - Dim templates overridden for the active site in the Project view (off by default) greys out hidden copies
See Overrides for overrides in general
Find Usages
Find Usages (Alt+F7) on a template, or on its file in the Project view, groups the results by kind:
| Group | Example |
|---|---|
| Rendered by controller | res.render('product/gridTile', tileModel) in Search.js |
| Rendered by script | ISML.renderTemplate('mail/orderConfirmation', model) in a helper |
| Rendered by pipeline | A pipeline interaction node with the template |
| Included by | <isinclude template="product/gridTile" /> |
| Decorated by | <isdecorate template="common/layout/page"> |
| Declared as custom tag | <ismodule template="components/loyaltyBadge" name="loyaltybadge" /> |
| Custom tag usage | <isloyaltybadge product="${product}" /> |
Rename
Rename (Shift+F6) on a template updates every path that names it, keeping each path's leading / and .isml as written. For copies in other cartridges, Rename overriding and overridden templates opens Rename Templates in Other Cartridges