I want to modify an article.hbs template to include text at the top of the article body
How do I do that in the code view? I've tried all the html code I can think of and none of it works. I can't find how to create a text block in the cookbook.
Anyone? I just need a line of text in all articles that use that page template.
-
Hi Sharon,
A good place to add text in article_page.hbs for these purposes could be right above the article's title:
<article id="main-content" class="article">
<header class="article-header">
INSERT TEXT HERE
<h1 title="{{article.title}}" class="article-title">
{{article.title}}
If you want to add some styling to make the text stand out, there's a good method here: How can I add a disclaimer to a Help Center article? It's describing how you'd add a callout to an individual article, but the same method could be applied to the article template in order to make the callout appear in every article. Hope that helps!
-
That was the piece I needed! I couldn't find it no matter how many search words I tried. Thank you!
Please sign in to leave a comment.
2 Comments