The Library Editor opens a content library file (root element library) as a tree of its folders, content assets and Page Designer pages, with the selected row's form under it. Every change is an edit of the XML and one Undo step. The Text tab beside Library Editor shows the same document
It has the toolbar, the Properties and XML panel, the actions and the license rules of every file in the Metadata Editor. This page covers what the library adds
The tree
The search reads IDs, names and bodies: a word of an asset's HTML finds the asset. The scopes are All, Assets (folders and classic content assets), Pages (Page Designer pages with their regions and components) and Folders (the folder tree), each with its count
| Column | What it shows |
|---|---|
| Name | The ID, with the name in grey |
| Kind | Asset, Page, Component or Fragment. A folder shows how many assets it holds, such as 0 assets |
| Locales | How many locales the names, the body and the data have |
| Online | A check box you can tick in the tree. A site override reads On, 1 site off |
| Searchable | A check box, for assets |
| Code | How many places in scripts and templates name the asset. A click lists them |
Assets in no folder sit under Unfiled, and components nothing links to under Unused components. An asset filed in a second folder shows there as Asset, also here: deleting that row removes the link, not the asset. Offline rows are grey
Pills and filters
The quick pills are Unused in code and Offline with the Code column, Offline and Problems without it. The other filters are in the Filters popup, each with how many rows it shows:
| Filter | Shows |
|---|---|
| Asset, Page, Component, Fragment, Folder | One kind of entry |
| A type, a folder, a locale | One per component type, folder and locale in the file |
| Only x-default, Missing a locale | Content with no other locale, or a name in a locale the body lacks |
| A site | Flags that site overrides |
| Visible, Invisible | Pages visible in a locale, or in none |
| Has body, Empty body | Assets with or without HTML |
| Has template, Has custom attributes | Entries with their own template, or custom attributes besides the body |
| Has aspect type, Has object assignments | Pages with an aspect, or assigned to categories or products |
| Unknown type, Orphan component, Region limit | Page Designer problems |
| Unknown data key, Missing required attribute | Component data the type doesn't define, or required data it lacks |
| Broken link, Duplicate ID | Links to content not in the file, IDs the file has twice |
| Marked for deletion | mode="delete" entries |
A filter shows only when a row has it
The asset form
| Section | What it holds |
|---|---|
| Asset | Name, Description and Search words per locale, the Template (The folder's or the site's when empty) with Go to Template, and Copy Script |
| Flags | Online and Searchable, then a row per site that overrides them |
| Body | The HTML per locale, see The body |
| Folders | The classification folder and the other folders the asset is in |
| SEO | Page title, description, keywords and URL, per locale |
| Code | The places in scripts and templates, with Show All in Find |
A localized field has a Translations button at its end, and +2 after it when two other locales have a value. Hover the button to read them, click it to edit every locale in a table. Copy Script copies ContentMgr.getContent('security-badges')
The body
The Locale row picks the locale and says how many have a body and their size, such as 2 locales, 2.9 KB. The body opens in the IDE's own HTML editor, with highlighting, completion, brace matching and syntax errors. Its header reads HTML:, with the size at the right before the buttons, such as 22 lines · 1.1 KB, or Empty
| Header control | What it does |
|---|---|
| Chevron | Folds the editor to its header. The IDE remembers it |
| Soft-Wrap | Wraps long lines, or scrolls them sideways. Remembered per language |
| Reformat | Lays the HTML out by the code style and writes it. The Reformat Code shortcut does the same |
| Editor Placement | Beside the Form, Below the Form or In the Form |
| Expand | The body alone in the whole Properties panel. Collapse or Esc gives the form back |
The body writes to the XML when you leave it or press Cmd+Enter / Ctrl+Enter. Esc puts back what it last wrote. Undo takes back your typing before the file's edits. Beside the Form falls back to below on a narrow panel, and below falls back to in the form on a short one. A body over 1 MB opens read only: Read only here: over 1 MB. Edit it in the XML
Compare and copy locales
Compare Locales… asks Compare x-default with and opens the IDE's diff of the two bodies. Both sides are editable, and the edits are one Undo step
Copy to Locales… copies the shown body to other locales. Cmd+Click / Ctrl+Click picks several, and a locale that has a body is marked replaces its value. Locales come from the sites of the project
Content links in a body
The body knows the content links of the storefront: $url('Page-Show','cid','privacy-policy-message')$, $staticlink$ and the others. The delimiters and the keys get their own colours, and what resolves is underlined
- Completion lists routes, the keys of a route, and the content asset, folder, category and product IDs, each with the file it comes from, such as
AcmeCA/library.xml Cmd+Click/Ctrl+Clickopens the route, the asset or the static file- An ID no library holds is red: Cannot resolve content asset '…', with the fix Change to '…'. The inspection also flags an unclosed link, a missing route and a key with no value
Site overrides
Override for a Site… asks for the Site ID and adds an Online row for that site, under the default. Its value is one of:
| Value | Writes |
|---|---|
| On, Off | The site's own value |
| Inherit | xsi:nil: the import clears the site's value, so the default applies |
| Not in the file | Removes the row: the import leaves the site's value as it is |
The tree's Online cell then reads On, 1 site off, and the asset counts as Offline
Folders
Set Classification… picks the asset's classification folder from Classification folder. The row moves under that folder in the tree. Also in lists the other folders with their positions. Add or remove them, Enter IDs… to paste several, one per line, or Go to Folder
A folder's form holds its Name and Description per locale, Online, the Template (The site's when empty), the Parent (not for root) and the Position, a whole number, then SEO. Duplicate… copies a folder under a new ID, right after it. Rename… changes its ID, and its subfolders and folder links follow. Renaming an asset updates the links and variant assignments in the file
Several rows
Select several rows with Cmd+Click / Ctrl+Click or Shift+Click. The form reads 2 rows selected, Changes apply to all of them, and each flag is checked, unchecked or mixed. Add to Folder… files every selected asset in one folder
The library and its file
With no row selected, the form shows the Library (Site library, or the ID of a shared one, with its folders and assets), Add Content Asset and Add Folder, then the Code count: 5 of 7 entries, with Select the 2 Unused. The File section names the archive and the site the file applies to
The shared form takes two assets or more. With a folder in the selection, such as root among the unused, the form is the first row's: the folder's, under 2 rows selected
Add assets and folders
Add Content Asset in the summary, or Add › Content Asset… in the toolbar, asks for the Content ID. The new asset is online, not searchable, with an empty body, and filed in the selected row's folder or in root. Add Folder and Folder… ask for the Folder ID and add the folder under the selected row's folder or under root
Page… adds a Page Designer page, and Component… a component in the selected page or region
Mark for deletion
Right-click a row for Add, its own actions and the shared ones. Mark for Deletion keeps only the ID with mode="delete", so the import deletes the folder or the asset. The row is struck out, its flags and code count go, and a folder leaves its parent. Delete removes the element from the file instead
Properties and XML
Show in XML (Cmd+Down / F4) opens the XML tab with the caret on the row's element and its lines marked. The split button shows Properties and XML side by side, stacked on a narrow panel. Click it again, or a tab, to show one at a time
Page Designer
In Pages, a page holds its regions, and each region its components. A region reads region, 2 of 4, red over its limit. A component shows its type, red when no cartridge defines it
- A page form has the type, aspect, visibility, category and product assignments, and its regions with Add Component…
- A component form has a Data section with a field for each attribute of the type's JSON, per locale. Edit as JSON shows the data as JSON, and a key the type doesn't define reads Not in and the type ID, with Remove
- Go to Type opens the type's JSON, and Create Page Designer Type writes its
.json,.jsand.ismlinto a cartridge from the data - Copy Script copies
PageMgr.getPage('id')
Checks
| Problem | Why |
|---|---|
Parent home is not in this file, Folder sale is not in this file | A folder or a link names a folder the file doesn't have |
| The folder tree has a cycle through … | A folder is its own ancestor |
| More than one classification link | An asset has one classification folder |
| No cartridge defines … | A page or component type no cartridge has |
Region main holds 5 of 4 | A region over its type's limit. Add Component… warns Region main holds at most 4 components. |
| A … value is over 4,000 characters | The platform's limit for a localized value |
Locale en_US: xml:lang takes en-US | Locales are written with a hyphen |
Site ID … is over 32 characters | The platform's limit for a site ID |