NO BUG: Importing Templates and Changing Classes Affects Future Imports

Browser: Chrome Version 123.0.6312.106 (Official Build) (64-bit)
OS: Windows 10 Home
URL: https://contentsprout.websitecomingsoon.design/
Video: Support - Bricks - Importing Templates and Changing Classes Affects Future Imports | Loom

Steps to reproduce:

  • Create a template in a second (remote) site. Make sure template uses class-based styles.
  • Connect another site with the first (remote) site.
  • Import template to second site
  • Modify classes in the newly imported template (renaming classes), and save changes.
  • Reload the browser (for safe measure), and import the same template from the remote site.

Issue: When re-importing the remote template, the changes to the class names are preserved in the import.

Expected Behavior: When importing a remote template, the class names found in the remote template are always imported with those specific class names, regardless if the template was imported previously and class names were changed.

Workaround: The workaround for now is to create all new classes for the imported template, copy styles from the classes which were imported, and paste the styles to the newly created classes. This, however, takes much more time to do than simply renaming classes.

Application: We have a repository of templates we use and when we import the templates, we want to retain all of the class based styling, but apply classes that are more meaningful to the specific site we are working on and the implementation of that layout in that site’s design.

Hi Chris,
Thanks so much for your report!

Each class has a unique identifier (let’s call it classID) under which it is stored and referenced.

If you rename the class within the new installation or change its settings, the classID remains the same, so whenever you import or paste an element that contains this class, the changes you made will apply (because the classID is still the same).

Example:

On installation 1, you have a class called “a” with a blue background. You copy the element or import the template that uses this class to installation 2, rename the class to “b,” and change the background color to red.
Whenever you copy or import the template again, the class name will be “b” and the background-color will be red (because the classID is still the same).

Solution:

You can use the Class Manager’s “duplicate” feature to duplicate the class before you make any changes to it. The duplicated class gets a new unique identifier (classID) and can be styled and named individually. Accordingly, you can still paste or import the “original” template with its initial classes.

Alternatively, you can of course create a new class “b” manually, copy the settings from class “a”, paste them into “b”, and then adjust them.

Best regards,
timmse

1 Like

@timmse is it not possible to generate new IDs when a template is imported? This would make the most sense to me.

1 Like

Hi @timmse I understand this being marked as “not a bug” because it’s expected behavior, but I have to insist that this is not ideal in terms of behavior. Do you think it’s possible to improve this functionality? If so, I can submit this as a feature request.

1 Like

@timmse - I am interested about a similar thing as @ChrisCastillo
Why was there the option of adding __imported to all classes of an imported template and then “fixed” instead of keeping this option and adding a “disable” for those we have no use of this feature?

1 Like