Explaining Shared Components and Shared Slots

Objective

After completing this lesson, you will be able to contrast shared components and slots from non-shared components to improve reuse and consistency of web content.

Details of Shared Components and Their Synchronization

Let us summarize what we already know:

A page template gives structure to all pages derived from it by providing content slots. Those content slots show up on each page. A slot can either be a shared content slot or a page content slot. A shared content slot exists only once and belongs to the template. A page content slot exists individually and belongs to each page derived by from that template. Page content slots can be populated in SmartEdit’s Basic Edit mode. Their component management stays on "page level".

Note

Shared content slots as well as page content slots are fully covered later in the lesson.

Nevertheless, both content slot types can be individually populated either with new components or by reusing existing ones, so called shared components. Shared components are visualized on the UI by a chain link icon:

The image shows on the right a user interface for Saved Components where various reusable components are listed and on the left an image component on a page in SmartEdit. It displays a person wearing sunglasses. On the left and on the right, an icon displaying a linked chain indicate that the component is a shared component.

Management of shared components offers substantial time savings compared to individual and always newly created nonshared components.

Let’s say, Laura has modified a shared component. To sync it, she can conveniently synchronize any slot hosting this component. Why? Because the shared component exists only once in the staged catalog version. Synchronizing this single component instance affects all related slots in the online catalog simultaneously.

Deep Dive into Shared and Non-Shared Content Slots

In Advanced Edit mode, we can manage components on "template level" by using shared slots. These slots belong to the template. A component added to a shared slot of a template shows up on all pages derived from the template, showing this shared slot. Typical examples of components living in a shared slot and thus present on many pages are the company logo or the search box. This feature is powerful and, therefore, typically restricted to more experienced users.

Note

Remember the two different scopes:

Adding a nonshared component to a page slot makes it only part of the current page.

Adding a nonshared component to a shared slot makes it visible on all pages derived from the template from which also the current page was derived.

Let’s look at a video covering the management of shared components and how to use and synchronize shared slots:

Management of Shared Content Slots in SmartEdit’s Advanced Edit Mode

Laura can’t directly access templates in SmartEdit. Instead, when she creates a page, she chooses the template from which her new page is to inherit page slots and shared slots. By adding a component to a shared content slot on her page, this component "logically" belongs to the template. It will now implicitly show up on all pages derived by this template in the past, present and even in the future.

Quick Comparison of Shared Components and Shared Slots – Two Typical Use Cases

Shared component in page content slots:

A shared component can be added to different page slots on several pages–literally everywhere, even derived from different templates. If Laura wants to populate 10 locations, she has to manually add this component 10 times, but any change to this shared component will affect all 10 locations instantly.

Nonshared component in a shared slot:

Adding a nonshared component just once to a shared slot of a template makes it show up instantly on all pages derived by this template. Any change to this nonshared component also affects all related shared slot locations simultaneously.

Caution

Keep the different scopes of shared and page content slots in mind when moving components between them!

Synchronization of Shared and Page Content Slots in Advanced Edit Mode

As previously mentioned, synchronization of page content slots is supported by the context menu of the slot itself, but also on the Page Structure Tree as well as the Sync panel. This is of course only possible if the page status is Ready to Sync.

Synchronization of shared content slots is also supported by the context menu of the slot itself and by the Page Structure Tree and fully independent of the current page status!

Why? Because shared slots logically belong to the template and are only "shown" on all pages derived by that template. Thus, they are not even listed on the "page scoped" Sync panel.

See some of the different synchronization options provided:

  1. Shared slots, by Page Structure Tree
  2. Page slots by Page Structure Tree or via Sync panel
  3. Synchronization directly available on shared or page slot itself
The image shows the Sync panel with options to sync all or individual page content slots. The Page Structure tree allows for the same options, but it adds the functionality to also synchronize shared slots. The Page Structure tree also provides more detail by allowing the synchronization of specific components inside a slot.

Converting a Shared into a Non-Shared Slot on a Single Page

By now, we know page slots and shared slots, but there is a third type of content slot:

SmartEdit’s Advanced Edit mode allows the conversion of a shared into a nonshared content slot. This newly created nonshared content slot replaces the shared content slot on the current page. You can think of it as being placed on top of the shared content slot so that the content of the shared content slot isn’t displayed on that page anymore.

This allows Laura to hide the content of the former shared slot on that page and replace it with content she prefers. When she converts a shared slot, the nonshared slot becomes part of the current page and can’t be used in any other page.

Let us take a real-life example:

Laura must replace the company logo, located in the shared logo slot, but the replacement only affects the home page. Converting the shared slot on the homepage to a brand-new nonshared slot is the best option.

The following diagram illustrates the process started either from the Page Structure tab or the shared logo slot itself:

The image shows the user interface of the page structure tree to convert a shared slot to a non-shared slot. 1st: Click on the chain link icon. 2nd: Click 'Replace Slot' and in the 'Replace Slot Editor', choose how to handle the components: clone all, use existing or remove all.

Laura successfully replaced the home page shared logo slot with a brand-new nonshared slot, visualized by the "nonshared slot" icon.

She also decided to ‘Remove all’ previous components. Now, the new slot is empty and ready to be populated with a different logo. As seen in the previous diagram, two alternative options were also available:

  • 'Use existing,' where the components remain the same as in the shared slot. This results in every component becoming a shared one, because of their usage in at least 2 slots.
  • 'Clone all,' which facilitates an independent copy of every component existing in the shared slot now present in the newly converted non-shared slot.

The following image shows how Laura could now add components to the empty nonshared slot:

  1. Add components to an empty non-shared slot
  2. Non-shared slot visualization uses the "non-shared slot " icon
Image shows how to drag-and-drop components to an empty and freshly converted non-shared content slot. It also shows where to find the non-shared slot icon, which looks like an open chain link icon. This icon appears on the slot representation in the page structure tree as well as on the border of the slot location itself.

Nonshared content slots can be synchronized like a regular page slot: Either in the Sync panel or by using the Page Structure Tree.

Laura could revert the nonshared slot back to the previous shared slot by clicking on the "nonshared slot" icon. It is provided on the border of the slot itself as well as on in the page structure tab.

Let’s see where Laura can revert the nonshared slot back to the original shared slot:

Image shows how to revert the non-shared slot back to the original shared slot by clicking on the open chain link icon. This icon appears on the slot represantation in the page structure tree as well as on the border of the slot location itself.

Cloning a Page by Utilizing the Advanced Edit Mode of SmartEdit

SmartEdit’s Advanced Edit mode allows the cloning of the current page. That results in the creation of a new page based on the configuration of the current page, applying the same template, components, and layout.

Image shows how to clone a page by pressing the Clone button.

Laura only needs to press the Clone button, which opens the dialog ‘Clone Page’.

It allows her to either reuse the original components, which implicitly results in making them shared components. Or alternatively clone them, resulting in new and independent copies of the original components.

Image shows how to handle components from the original page during the cloning of it: Either reuse the original ones, making them shared, or clone them into independent copies of the original components.

Log in to track your progress & complete quizzes