It’s common to repeat certain content — such as navigation bars, blocks containing your business contact information, event announcements or promotional items — across several of your landing pages. With global blocks, you can save time and effort by reusing a block on multiple pages and, when you need to make an edit to the block, your changes will be made in all locations.
Here are a few common global block types that might be useful for you:
- Branded headers/footers
- Social proof (customer testimonials or online reviews)
- Pricing options
- Coupon offers
- Event details
- Contact information
- Social media icons
- Your bio/credentials
- Images or logos
For example, below are header and footer global blocks that could be included on several pages. Watch this video to learn more about setting up navigation for your pages!
Global blocks use the same drag and drop editor as any other block on your page, but they do have a few different options when editing and publishing.
Table of contents
Add
Edit
Save
Publish
Convert existing blocks
Detach from global editing
Remove
Delete
See all locations
Display settings
• Use case
Add your “Log in” link
Add your “Log out” link
Edit your display settings
Add
Adding global blocks is the same as adding any other block. The only difference is you’ll select “global blocks” from the left sidebar after clicking “add block.”
- Click → Global Blocks.
- Choose to either build your own block (either from scratch or using our pre-designed blocks) or add an existing global block.
Edit
When you edit global blocks, you’ll see that the top bar is simplified with only the options that relate to blocks.
- Hover over your global block and click Edit Global Block.
- Name your block in the top left corner.
- Edit the block as you would normal page blocks.
Save
If you aren’t ready to update every instance of your global blocks, you can still edit them and save your changes in the editor. The next time that you edit your block, your changes will still be there but not added to the pages where your blocks live.
- Click Save → → Not Now.
Publish
When you’re satisfied with your edits, you can update all instances of your block by publishing it.
- Click Publish. A confirmation pop up will appear and tell you how many pages will be updated. If you approve updating all the listed pages, click Publish at the bottom of the pop up.
- Click to return to your page editor.
Convert existing blocks
You can convert any block that you’ve created on any page to be a global block. So if you’ve already created navigation bars using normal blocks, you can easily make them global.
- Select the block you’d like to convert and click → → Convert Block.
- Name your block in the top left corner.
Detach from global editing
When you detach a global block from the page, that instance of your block stays on your page, but it’s detached from global editing. This is ideal if you need one page with a slightly different navigation bar or footer.
- Hover over your global block and click Detach Global Block → Detach Block.
Remove
When you remove a global block from your page, you can choose to remove the block from only the page you are editing or from all pages it is placed on.
- Hover over your global block and click (which appears on the right edge of the block), click which page(s) you would like to remove the block from, then click Remove Block.
Delete
Deleting a global block will remove it from your library and all pages where it’s placed.
- Click → Global Blocks → .
- Type “DELETE” then click Delete Block.
See all locations
If you would like to make sure that you’ve put your global blocks on every page you need them, you can pull up a list of every page that has your block on it.
- From your global block editor click View block pages.
- You’ll see a pop up that lists the name of every page that has your global block on it. Click the page name, and the editor of that page will open in a new tab.
Use display settings
Just like with normal blocks, you can add display conditions to your global blocks. This allows you to create a mobile only version of your global blocks, choose when you want your block to appear, and choose who you want to see your block. Here’s how:
- Set up your global block’s design then click Edit Block on the right side of your block.
- Click Display Settings and add the settings you’d like.
- Check out this article to see what each block display setting does.
- Click Done and save or publish your block.
Display settings use case
The most common use case for global block display settings is creating a global navigation block that gives members who aren’t logged in a “Log in” link, and members who are logged in a “Log out” link.
An Ontraport Membership site is required for this use case.
Before you start, make sure you have two global blocks with the same design. The only difference between your global blocks is that one should say “Log in” and the other should say “Log out.”
You can use the Navigation page element to create your global blocks. This element allows you to create responsive navigation menus that are easy to add to any of your site’s pages.
Add your “Log in” link
- Edit your global block that includes your link to log in.
- Click into your “Log in” link’s settings, and choose your Ontraport Membership login page from the “Ontraport Landing Page” link option.
- Click Insert Link.
Add your “Log Out” link
Now that you have a global navigation block that people who aren’t logged in to your membership site will see, it’s time to add your log out link and make sure only logged in members can see it. Here’s how:
- Edit your global block that includes your log out link.
- Click into your log out link’s settings, and select where you’d like to send members when they log out.
- In your links settings, check “Log members out of membership site.”
- This option is only available on pages that are published to your membership site’s domain.
- Click Insert Link.
Edit your display settings
- Click Edit Block → Display Settings.
- In the “Display this block to whom?” dropdown, select “Everyone except logged in members.”
- Click Done
- Publish your global block.
That’s it! When your members visit your site and aren’t logged in, they will see a “Log in” link in their navigation, and once they log in they’ll see an option to log out.