Content blocks cannot be used more than once
See original GitHub issueIf I am defining a block like this:
{{#contentFor "page_title"}}
Dashboard Home
{{/contentFor}}
And using it like this:
<title>{{{block "page_title"}}}</title>
<h1>{{{block "page_title"}}}</h1>
The second usage doesn’t work. It seems after the first time it is used, it is cleared out (to free memory).
https://github.com/barc/express-hbs/blob/master/lib/hbs.js#L37
this.blocks[name] = null;
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Reusing content with content blocks - Zendesk help
Content blocks let you create content that you can share between multiple articles. This is useful for content such as disclaimers or ...
Read more >About Content Blocks for Landing Pages - Mailchimp
Drag-and-drop content blocks make it easy to customize your Mailchimp landing pages. Use content blocks to add or edit text, images, products, promo...
Read more >Content Blocks - Braze
This reference article explains how to use the Content Blocks Library to manage your reusable, cross-channel content in a single, centralized location.
Read more >What Are Content Blocks and How Do I Use Them?
The text block allows you to customize your writing using different fonts, colors, sizes, alignments, and more. You can also insert links or ......
Read more >Cannot edit content blocks after publishing the page in more ...
Cannot edit content blocks after publishing the page in more than one language using a synced strategy. ... 1. Create a page and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1. Here’s another common use case for content blocks that breaks because of this bug:
This does appear to be fixed, at least on
2.3.0
(didn’t test others).