Global Blocks Migration
In this article, we're going to discuss how Global Blocks are migrated to the Component Builder upon updating your site.
As you may have gathered from reading about the Component Builder, it has effectively taken over the role that Global Blocks once served by dramatically improving upon it in terms of both functionality and flexibility. Fortunately, there is a seamless migration path for any of your old Global Blocks, which will keep them working just as they always have on your site and allow you to upgrade over time to the “new” way of doing things if you so desire. 😊
Previous to Pro 6.0, X 10.0, and Cornerstone 7.0, Global Blocks were managed by going to the Global Block Builder in the main app navigation. Let's take a look at a scenario where we have a site with two Global Blocks, one labeled “My Button” and the other labeled “My Call to Action Section:”
Leveraging these assets in a design was done by using the “Global Block” Element to pull them through:
Once on a page, the asset being output was determined by the selection made from the dropdown menu in the Element's only control:
After upgrading to Pro 6.0, X 10.0, or Cornerstone 7.0, any Global Block previously setup on an old site will be found under the new Components section of the main Document navigation:
While the Component Builder is built on the principal of exports (as discussed previously in this article), which allows for much greater flexibility in eliminating extraneous markup, you can still reference an entire Component Set by using the “Component” Element, which functions as the old “Global Block” Element did:
Any instance of the “Global Block” Element found in your designs will automatically change over to the new “Component” Element:
Keep in mind that the “Component” Element will pull through all markup found within a Component Set. Because of this, we strongly encourage you to only use it for backwards compability. Any new development should be built leveraging the exporting feature of Components.
See something inaccurate? Let us know