Content blocks are segments of text that are grouped and reused across one or more articles in your help center. You can create a content block from your help center or from within an article where you want to use the content block. In both cases, the content block appears in the content block list, where you can view the content block and where it is used, edit the content block, and perform other management functions. See Managing content blocks in articles.
Guide admins can create and insert content blocks on any article that is enabled for content blocks. Agents can only create and insert content blocks in articles that they have permission to edit. Guide admins or agents with permission to update content blocks can edit and update content blocks in published articles that include those blocks.
Creating a content block from the help center
When you create a content block from the help center menu, the content block is added to the content blocks list and is available to insert into any article where you want it to appear. See Inserting a content block into an article.
Content blocks created from the help center take on the default locale of the help center, regardless of the language used within the content block itself. For example, if you create content blocks from a help center where the default language is American English, the content block locale will also be English, even if the body of the content block contains Spanish text.
To create a content block from the help center
- In your help center or Guide admin, click Add in the top menu bar, then select Content block.
- Give the content block a meaningful name, so you can easily identify it when you reuse it in other articles. This is an internal name that identifies your content block on the content blocks list. It is not visible to end users.
- Use the toolbar and autoformatting options to format the content within the content block as needed, for example, adding bold, creating a bulleted list, or inserting a link or media (such as video). See Help center article editor reference.
Formatting the content in a content block affects all articles that use this content block.
- Click Create.
The content is now a content block and is stored independently for reuse by other articles. You can edit the content block or return to the content block list to perform other management tasks. See Managing content blocks in articles.
Creating a content block from an article
You can create a content block from a single unit of content, for example, a paragraph, a section heading, a code block, or a bulleted list. You can also create a content block from multiple (consecutive) sections of content in an article, or even from the text of an entire article. You can use one or many content blocks within an article, alongside regular text. In this section regular text refers to any article text that you create that is not in a content block.
Content blocks created from an article assume the article’s locale, regardless of the language used within the content block itself. For example, if you create a content block from a Spanish article, the content block’s locale will also be Spanish, even if the content of the block contains English text.
After you enable your article for content blocks, you can start creating reusable content.
To create a content block
- In your article, select the content you want to make into a reusable content block.
Note: If you select a fragment of text, for example, one sentence within a paragraph, the whole paragraph will be included in the new content block. A paragraph or section heading is the smallest fragment of content that you can include in a content block.
- On the top toolbar, click the content block (
) icon.
Note: When you are creating a content block from within an article, the article remains open in the background. To return to the article without saving the content block, click the breadcrumb in the upper left corner of the window. - Give the content block a meaningful name, so that you can easily identify it when you reuse it in other articles.
- Use the toolbar and autoformatting options to format the content within the content block as needed, for example, adding bold, creating a bulleted list, or inserting a link or media (such as a video). See Help center article editor reference.
Formatting the content in a content block affects all articles that use this content block.
- Click Create.
The content is now a content block and is stored independently for reuse by other articles. In the article, the text appears with a shaded background. You don't need to save the article to create a content block.
Inserting a content block into an article
After you have enabled your article for content blocks, you can insert reusable content.
To insert content from a content block
- In your article, click where you want to add reusable content.
- On the top toolbar, click the content block (
) icon.
A list of available content blocks appears.
- Choose the content block that you want to add.
Refine your results by:
- Specifying part of the content block name. Only the content block name is searched, not the content block body.
- Sorting by edited date or created date.
- Sorting alphabetically.
- Click a content block to preview the content.
- Click Insert.
The content block is inserted into the article and appears with a shaded background.
In the source code view (
If your cursor is above a content block and you click the source code view, you will only see the HTML code for the text above the content block. To see the HTML code below the content block, place your cursor below the content block, then open the source code view.), you won't see any HTML code for content blocks, only for your regular text. This is because content blocks live independently in the help center. Additionally, you'll only see the HTML code for the chunk of regular text where your cursor is placed, between content blocks.
41 Comments
It seems that if you include accordion content within a content block, the accordion toggle functionality no longer works when the content block is then added to another article. Is there a workaround for this? Thanks.
Hi Technical Writer - Marco Haber,
We are not supporting advanced article components in content blocks just yet, so I'm not surprised that this is not shared.
Out of curiosity, how have you tried to implement the accordion? was it directly in the content block source code? It might work better if you define a class for the accordion in the theme and apply it to a given element in the block.
Katarzyna Karpinska It would be great if we had greatly more flexibility when using HTML source code. We're desperate for a solution that supports images on CBs, even if we source images from outside and code them directly with HTML. Other things too e.g. text color.
Ricardo Pereira, if there are no unforeseen earthquakes we'll be launching images in CBs within the next month! Add-ons to formatting tools in CBs will follow shortly after.
That would be a great update!
Any news on inserting images into content blocks?
Jeff Stephenson, yes!! We are planning to launch it within a few weeks!
I would also see a better use case for content blocks in macros in our company, likely even better than for the articles. Is there something planned along these lines, or is there an alternative we can use?
Hello, is there any way to make the content block visible to only certain users? I'd like to add a content block to an article that's only visible to signed-in users
Rick Marx, thank you for your comment, we definitely see the potential of extending content blocks to macros but we have some other pressing work in the pipeline we need to get to before that will be possible. The same applies for visibility permissions for content blocks Eduardo Escobar
Hi Katarzyna Karpinska,
I was wondering if there is any news on the availability of tables in Content Blocks?
I was hoping to create a banner displaying which articles relate to certain products my company offers (similar to the image Zendesk uses in their articles :D ) and found creating a html table was easier than using an image.
Best regards
Stephen
Please sign in to leave a comment.