Your knowledge base's homepage is the initial landing page that readers will see if they go to your default link. Usually, the homepage includes things like customer support contact information, announcements, or a description of what the knowledge base contains. You can also show a list of newest and most popular articles!
There are two places you can edit your homepage, depending on what type of edit you want to make:
- The Homepage option in the lefthand navigation: This opens the homepage editor where you can add more content to your homepage, like announcements, instructions, or welcome videos.
- Settings > Style > Custom HTML > Homepage: Here you can edit the overall layout, add or remove the article lists, and more. (You can also adjust styles for how things display in the Custom CSS section.) The text entered in the Homepage editor mentioned above gets inserted wherever the
[homepage("body")]
template is:
Older knowledge bases
Knowledge bases created before October 2022 or created from copies of knowledge bases created before then may have most of their HTML in Homepage instead of Settings > Style > Custom HTML > Homepage.
If you are editing Settings > Style > Custom HTML > Homepage, the homepage("body") template mergecode must appear in the Custom HTML for the Homepage, even if the Homepage editor is empty.
A new knowledge base will display a title at the top saying "Welcome to...." with the knowledge base name after it. We populate this text based on the name you initially picked out for your knowledge base.
If you want to change that text, there are a couple different ways to do it.
If you just want to update the portion that comes after "Welcome to...": that text is based on the name of your knowledge base as it's defined in Settings > Basic. If you want to rename your knowledge base completely (which will also update that welcome text):
- Go to Settings > Basic.
- Update the Knowledge base name.
- Be sure to Save your changes.
If you want to update the "Welcome to..." text in any other way:
- Go to Homepage.
- In the Homepage content section, edit the Title text.
- You can Preview your changes to be sure you like them.
- Then Save once you're done.
(You can also Remove the homepage welcome text completely if you so choose!)
That didn't work...
If editing the Homepage content Title in Homepage doesn't make any changes in your knowledge base, that generally means someone's already customized your homepage a bit.
In this case:
- Go to Settings > Style.
- Below the preview pane, be sure Custom HTML is selected.
- In the Custom HTML dropdown, select Homepage.
- Our default layout includes the title in an h1 with
class="hg-article-title xcolor"
, and someone may have edited the text there. You can update the title to one of your choice here, too! - You can Preview Changes to be sure you edited the right thing.
- Be sure to Save once you like the changes you've made.
All new knowledge bases are created with no banner image on the homepage. If you'd like to add one, you can choose to replace it with:
- A solid color
- A color gradient
- An image of your choice
Steps for each are outlined below.
Before you begin
Only use if you have no banner
These instructions assume you do not already have a banner image set up on your homepage. If you DO already have some type of banner image or colored section on your homepage, check out Change the background image on my homepage!
Before you begin, you'll need to know two things:
- The color(s) you'd like to use for a solid color or color gradient background (hexes, RGB, or browser default names are fine) OR the image you'd like to use
- Whether you're using our out-of-the-box Support Theme or a customized theme (read on in this section for more details)
To figure out if you're using our out-of-the-box Support Theme, first, be sure your knowledge base currently doesn't display a banner image of any kind on the homepage. If it does, head over to Change the background image on my homepage instead.
Then:
- Check if your Custom CSS begins with a comment with General structure at the top:
- If it does, you're using our new Support Theme. You can follow any of the instructions below without making any adjustments.
- If it doesn't begin with that section, your knowledge base has a customized theme. You'll need to see if there's any CSS that includes
.ko-homepage-top
and adjust that CSS. You can use the instructions below as a guide, but you may need to make additional tweaks.
Replace with a solid color
To add a solid color to your homepage banner area:
- Go to Settings > Style.
- In the Customize HTML, CSS, and JS section, be sure Custom CSS is selected.
- Find the Homepage Top and General section of your Custom CSS, which should be at or near row 332:
- The changes we're making should all be within the
.hg-minimalist-theme .ko-homepage-top
section, rows 334-338 in the screenshot above. - Remove
background: none;
- Copy the code below and paste it in where the
background: none;
was:background-color: #8bc34a; /* set background color for homepage banner */ background-image: none; /* ensure no background image displays */
- Adjust the background-color value to be the hex or rgb value of your choice.
- Your final CSS should look something like this, with your background-color hex of choice:
/******************************************************** Homepage Top and General */ /* get rid of background banner and add some padding to top of homepage */ .hg-minimalist-theme .ko-homepage-top { background-color: #8bc34a; /* set background color for homepage banner */ background-image: none; /* ensure no background image displays */ padding-top: 2em; padding-bottom: 0em; }
- Optional: if you'd like the banner to extend slightly below the search box on the homepage, remove the
padding-bottom: 0em;
line from that Custom CSS. - Be sure to Save your changes.
Replace with a color gradient
What if you'd rather use a color gradient, instead of a solid color, for your banner area?
Don't worry, you don't have to know anything about image editing tools and don't have to generate it yourself. There's a built-in CSS function that can do color gradients for you--you just need to know which colors you want to feed in! You'll need at least two colors to pass in to the function; you can used browser default named colors (like red, yellow, blue), hexes, or rgb values for specific brand colors.
In our example below, we use browser default named colors.
To add a color gradient area to the top of your homepage:
- Go to Settings > Style.
- In the Customize HTML, CSS, and JS section, be sure Custom CSS is selected.
- Find the Homepage Top and General section of your Custom CSS, which should be at or near row 332:
- The changes we're making should all be within the
.hg-minimalist-theme .ko-homepage-top
section, rows 334-338 in the screenshot above. - Remove
background: none;
- Copy the code below and paste it in where the
background: none;
was:background-image: linear-gradient(red, yellow);
/* set background color gradient */ - Replace the linear-gradient values with your choice. You must have at least two colors but can have more, and you can also specify direction and/or degree. Refer to the W3School's entry for linear-gradient function for more details.
- Your final CSS should look like this, with whatever colors you've selected:
/******************************************************** Homepage Top and General */ /* get rid of background banner and add some padding to top of homepage */ .hg-minimalist-theme .ko-homepage-top { background-image: linear-gradient(red, yellow); /* set background color gradient */ padding-top: 2em; padding-bottom: 0em; }
- Optional: if you'd like the banner to extend slightly below the search box on the homepage, remove the
padding-bottom: 0em;
line from that Custom CSS. - Be sure to Save your changes.
Replace with your own image
First, you'll need to find an image you'd like to use. This can involve some trial and error.
Here are some tips to help you find a good image:
- Ideally you want an image with a 5:1 aspect ratio, so it's much wider than it is tall.
- Large overall dimensions tend to work better, around 1500px x 300px is a good place to start, though we have no set requirements.
- The overall image file size should be relatively small. Ideally the image file size is in kilobytes (KB) not megabytes (MB) as large files will slow down your page load time.
- If you have the choice between a .jpg and a .png file, choose the .png. PNG files tend to scale better with different screen sizes, whereas .jpg can become a little fuzzy at certain resolutions. If you have the choice for a .webp file, use that.
- Alternatively, choose a smaller image that would look nice as tiles in the background.
Once you have an image that you'd like to work with:
- Go to Library > Files and upload it to your File Library.
- Once you've uploaded your image file, find the URL. Copy it and paste it into a text editor or somewhere else--we'll need it later!
- Go to Settings > Style.
- In the Customize HTML, CSS, and JS section, be sure Custom CSS is selected.
- Find the Homepage Top and General section of your Custom CSS, which should be at or near row 332:
- The changes we're making should all be within the
.hg-minimalist-theme .ko-homepage-top
section, rows 334-338 in the screenshot above. - Remove
background: none;
- Copy the code below and paste it in where the
background: none;
was:background-image: url("/css/images/tweed.png");
- Replace
/css/images/tweed.png
with the URL you copied in Step 2 from the File Library. Keep the URL in "quotes". So, for example, here's what it might look like using a URL from our File Library:/******************************************************** Homepage Top and General */ /* get rid of background banner and add some padding to top of homepage */ .hg-minimalist-theme .ko-homepage-top { background-image: url("https://dyzz9obi78pm5.cloudfront.net/app/image/id/1ab1ab1ab1ab1ab1ab1ab1ab1/n/sample-banner-image.png"); padding-top: 2em; padding-bottom: 0em; }
- Optional: if you'd like the banner to extend slightly below the search box on the homepage, remove the padding-bottom line from that Custom CSS.
- Once you're happy with your image changes, be sure to Save your changes.
- If you have repeating or other issues, see the steps below to troubleshoot further.
Is your image repeating or stretched weirdly?
If your image is smaller than the space provided it will repeat itself or stretch oddly:
To fix this, you have two options:
- Add
background-size: cover;
to your CSS. This will stretch the image to make it fit the overall dimensions. Sometimes this works well, but sometimes it distorts or cuts off parts of the image, so take a good look at the results. Your resulting CSS should look something like this:.hg-minimalist-theme .ko-homepage-top { background-image: url("
https://dyzz9obi78pm5.cloudfront.net/app/image/id/1ab1ab1ab1ab1ab1ab1ab1ab1/n/sample-banner-image.png
"); background-size: cover; padding-top: 2em; padding-bottom: 0em; } - If you don't like the look of
background-size: cover;
, try addingbackground-size: 100% 100%;
to your CSS. This will try to stretch the image proportionately to fit the screen it's displayed on, which can be more elegant for lots of different devices and sometimes bypasses the off-center distortion ofbackground-size: cover;
. Your resulting CSS should look like something like this:.hg-minimalist-theme .ko-homepage-top { background-image: url("
https://dyzz9obi78pm5.cloudfront.net/app/image/id/1ab1ab1ab1ab1ab1ab1ab1ab1/n/sample-banner-image.png
");background-size: 100% 100%; padding-top: 2em; padding-bottom: 0em; }
If your knowledge base homepage already has some kind of banner image or colored background and you'd like to change it, you can change it to:
- A solid color
- A color gradient
- An image
If your knowledge base homepage doesn't have any kind of background color or image, see Add a background image to my homepage.
Before you begin
If your knowledge base already has an image on the homepage of some kind:
- Go to Settings > Style.
- Check your Custom CSS to see if it already has something set for
.ko-homepage-top.
- If it doesn't, you should be able to follow the instructions below exactly.
- If it does, you'll need to adjust the CSS. You can use the instructions below as a guide.
Replace with a solid color
You can add a solid color to your homepage banner area:
- Go to Settings > Style.
- Below the preview pane, be sure Custom CSS is selected.
- To add a solid background color, copy the code below and paste it anywhere into the Custom CSS editor:
/* Set homepage banner image */
.ko-homepage-top { background-color: #8bc34a; /* set background color for homepage banner */ background-image: none; /* ensure no background image displays */ }
- Replace the background-color hex in row 3 with a color of your choice.
- You can use Preview Changes to see the difference.
- Be sure to Save your changes once you're done.
Replace with a color gradient
To replace the background image with a color gradient:
- Go to Settings > Style.
- Below the preview pane, be sure Custom CSS is selected.
- Copy the code below and paste it anywhere into the Custom CSS editor:
/* Set homepage banner image */
.ko-homepage-top {
}background-image: linear-gradient(red, yellow);
/* set background color gradient */ - Replace the linear-gradient values with your choice. You must have at least two colors but can have more, and you can also specify direction and/or degree. See the W3School's entry for linear-gradient function for more details.
- You can use Preview Changes to see the difference.
- Be sure to Save your changes once you're done.
Replace with your own image
First, you'll need to find an image you'd like to use. This can involve some trial and error. Here are some tips to help you find a good image:
- Ideally you want an image with a 5:1 aspect ratio, so it's much wider than it is tall.
- Large overall dimensions tend to work better, around 1500px x 300px is a good place to start, though we have no set requirements here.
- The overall image file size should be relatively small. Ideally the image file size is in kilobytes (KB) not megabytes (MB) as large files will slow down your homepage load time.
- If you have the choice between a .jpg and a .png file, choose the .png. PNG files tend to scale better with different screen sizes, whereas .jpg can become a little fuzzy at certain resolutions.
- You might also choose a smaller image that would look nice as tiles in the background.
Once you have an image that you'd like to work with:
- Go to Library > Files and upload it to your File Library.
- Once you've uploaded your image file, find the URL. Copy it and paste it into a text editor or somewhere else--we'll need it later!
- Go to Settings > Style.
- Below the preview pane, be sure Custom CSS is selected.
- Copy the code below and paste it anywhere into the Custom CSS editor:
/* Set homepage banner image */
.ko-homepage-top { background-image: url("/css/images/tweed.png"); }
- Replace
/css/images/tweed.png
in row 3 with the URL you copied in Step 2 from the File Library. Keep the URL in "quotes". So, for example, here's what it might look like using a URL from our File Library:/* Set homepage banner image */ .ko-homepage-top { background-image: url("https://dyzz9obi78pm5.cloudfront.net/app/image/id/1ab1ab1ab1ab1ab1ab1ab1ab1/n/sample-banner-image.png"); padding-top: 2em; padding-bottom: 0em; }
- You can Preview Changes to see the difference. If you have repeating or other issues, see the steps below to troubleshoot further.
- Once you're happy with your image changes, be sure to Save your changes.
Is your image repeating?
If your image is smaller than the space provided it will repeat itself:
To fix this, you have two options:
- Add
background-size: cover;
to your CSS. This will stretch the image to make it fit the overall dimensions. Sometimes this works well, but sometimes it distorts or cuts off parts of the image, so take a good look at the results. Your resulting CSS should look something like this:.ko-homepage-top { background-image: url("/css/images/tweed.png"); background-size: cover; }
- If you don't like the look of
background-size: cover;
, try addingbackground-size: 100% 100%;
to your CSS. This will try to stretch the image proportionately to fit the screen it's displayed on, which can be more elegant for lots of different devices and sometimes bypasses the off-center distortion ofbackground-size: cover;
. Your resulting CSS should look like something like this:.ko-homepage-top { background-image: url("/css/images/tweed.png"); background-size: 100% 100%; }
By default, the title of your knowledge base will display above the search bar of your homepage in a "Welcome to...." statement:
You can Change the welcome text on my homepage, but in some cases you might want to remove it entirely. (For example, if you add a banner image that has your company name/logo in it already!)
To remove that welcome text completely, delete one line of HTML from the Homepage Custom HTML template:
- Go to Settings > Style.
- Below the preview pane, be sure Custom HTML is selected.
- In the Custom HTML dropdown, select Homepage.
- Delete the line that says
<h1 class="hg-article-title xcolor">[homepage("title")]</h1>
. In our default template and the sample below, it's in row 2:<div class="ko-homepage-top"> <h1 class="hg-article-title xcolor">[homepage("title")]</h1> [template("large-search")] </div> <div class="hg-article"> <div class="hg-article-body">
- You can Preview Changes to see the updated look.
- Your custom HTML should now look something like this, and your title should be gone:
<div class="ko-homepage-top> [template("large-search")] </div> <div class="hg-article"> <div class="hg-article-body">
- Be sure to Save your changes once you're done.
By default, the color of the "Welcome to..." statement on the homepage (the homepage title) is set to a dark blue:
To change it to another color:
- Go to Settings > Style.
- Below the preview pane, be sure Custom CSS is selected.
- Check if your Custom CSS begins with a comment with General structure at the top:
- If it does, follow the Update existing CSS instructions. If the Custom CSS section doesn't look like the above, stay with these instructions.
- Copy the code below and paste it into your Custom CSS pane:
/* Change color of homepage title */
.ko-homepage-top .hg-article-title { color: #000000; /* Update to use the color of your choice */ }
- Replace the #000000 on row 3 with the hex code or rbg value of your choice.
- You can Preview Changes to see the difference.
- Be sure to Save once you've got it looking the way you'd like.
Update existing CSS
If your Custom CSS included the General structure CSS in the screenshot above, you don't need to add any new CSS. You'll just need to update what's there.
- In Settings > Style, still in that Custom CSS pane, scroll about halfway down the pane until you find the Homepage Top and General section, which is just above the halfway point:
- Look for the third commented section here for change default color for homepage title, shown here in rows 5-8.
/* make sure category title is clickable */ .hg-minimalist-theme .hg-home-page .category-header { z-index: 2; } /* change default color for homepage title */ .hg-minimalist-theme .ko-homepage-top .hg-article-title { color: #1d284f; } /******************************************************** Content Lists */
- Update the color listed in that section from hex code
#1d284f
to the hex code or rgb value of your choice. - Be sure to Save your changes once you're done!
By default, all new knowledge bases use category icons on their homepage. If you're using one of our older knowledge base themes, or you're using a knowledge base created from a copy of an older knowledge base, you may need to manually update your knowledge base to use category icons on the homepage.
There are two ways to use category icons in your homepage category panels:
- Use our pre-built merge code to do the work for you: This requires less work and technical knowledge, but it will change the HTML structure of your homepage, which may mean you'll need to update Custom CSS to style the panels the same way.
Recommended
We recommend starting with this approach, since it uses built-in functionality. - Keep your existing styles and use a script (and some additional Custom CSS) to style your icons: This is a bit trickier but means you won't have to touch your current styles much.
We'll walk through each option in more detail below.
Use the merge code
To use the merge code, you'll need to update your homepage so that it's no longer using the [template("base-cats")] template.
Look before you leap
If your knowledge base is actively being used, contact us
to request a sandbox copy of your knowledge base to test this template in, since it will change the styles a bit!
To generate the automatic panels for your current homepage, a template for base-cats is used. This template is usually added in one of two places:
- Top-level Homepage
- Settings > Style, Custom HTML > Homepage
- Check each of these pages to see where [template("base-cats")] is referenced; you'll want to make the edits in the same place.
- Once you've found where the template is added, replace "base-cats" with "icon-cats". So your merge code should now look like:
[template("icon-cats")]
- By default, the icon-cats template will:
- Display all of your categories
- Display four categories per row
- Won't display the category description
- If you're happy with that, you can Save now. Otherwise, you can adjust the merge code to change this behavior.
- To limit the number of categories it shows, add
,max=<#>
. Make sure you have no spaces, and replace <#> with maximum number of categories you want to show. For example, this merge code will limit the number of categories displayed to eight:[template("icon-cats,max=8")]
- To adjust the number of categories displayed per row, add
,col=<#>
. Make sure you have no spaces, and replace <#> with the number of columns of categories you want per row. For example, this merge code will display three categories per row instead of the default four:[template("icon-cats,col=3")]
- To show the category description below the category's icon and title, add
,desc=1
, which tells the merge code to show descriptions:[template("icon-cats,desc=1")]
- You can use any combination of these settings together, too. This merge code will display a total of nine categories even if there are more, and will display them in rows of three with the category descriptions shown:
[template("icon-cats,max=9,col=3,desc=1")]
- You can use the Update Preview option to get a sneak peek of how that will look.
- Once you've finished making changes, be sure to Save them.
If you're using the default styles on the homepage, that will shift the homepage from having two or three categories per row with this styling:
To have four categories per row with this styling:
Styling the panels
If you have Custom CSS already applied to your homepage category tiles, that CSS won't generally work on the icon-cats template, since it constructs the HTML and CSS classes differently.
In the base-cats format, the row of category tiles is put within a div class="category-list"
with divs for faq-cat-panel-container
and faq-cat-panel
, something like this:
faq-cat-panel
div, which handles background, border, text alignment, and more.
Once you switch to icon-cats, the format changes significantly:
- The
category-list
div picks up two extra classes (panels
andcolx
, where x is replaced with the number of columns specified in the merge code). - The extra
faq-cat-panel-container
is completely removed. - The
faq-cat-panel
class changes tocat-icon-panel
. - The div also includes a div for
category-icon
. - The
cat-icon-panel
gets a title set, which helps with accessibility.
The default styles we use for the icon-cats classes are:
.cat-icon-panel {
border: 1px solid #e6e6e6;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
box-shadow: none;
padding: 16px;
border-radius: 5px;
cursor: pointer;
transition: all .2s ease-in-out;
backface-visibility: hidden;
}
.category-icon {
height: 100px;
transition: all .2s ease-in-out;
}
.hg-minimalist-theme .cat-icon-panel .category-header,
.cat-icon-panel .category-header {
font-size: 18px;
color: #1d284f;
}
.cat-icon-panel .category-header {
text-align: center;
}
.cat-icon-panel:hover {
transform: scale(1.01) translateZ(0);
box-shadow: 2px 4px 4px #aeaeae;
}
.cat-icon-panel:hover .category-icon {
transform: scale(1.10);
}
You can copy these and paste them into your Custom CSS and start tweaking them to do your styles.
Updating your existing CSS
Alternatively, you can try to update your existing CSS in-place. This will take some trial and error, but here are some tips:
- If you have any CSS that is setting the
.faq-cat-panel-container
width, you should be able to remove this completely. We no longer wrap the panels in a container to handle width; the icon-catscol=
variable lets you set this width directly in the merge code. Be sure that your merge code contains the appropriatecol=
setting to mimic this width CSS. - If you have any existing CSS specifying that
.faq-cat-panel-container
or.faq-cat-panel
useflex
(or any of the flex attributes), you should be able to remove that entirely. The icon-cats structure uses flex automatically. - If you have existing
.faq-cat-panel
styles, try copying that CSS and adding it to the.cat-icon-panel
class.- For example, if I have this CSS in my existing knowledge base:
.hg-home-page .category-list .faq-cat-panel { border: 2px solid black; box-shadow: none; padding: 16px; border-radius: 5px; }
- I can add a comma and add the same selectors but replace .faq-cat-panel with .cat-icon-panel:
.hg-home-page .category-list .faq-cat-panel, .hg-home-page .category-list .cat-icon-panel { border: 2px solid black; box-shadow: none; padding: 16px; border-radius: 5px; }
- For example, if I have this CSS in my existing knowledge base:
- Changes to the base styles for the
.cat-icon-panel
as well as the h3 within them should be fairly easy to update using this method. - You may need to add new
:hover
styles for.cat-icon-panel:hover
and.cat-icon-panel:hover .category-icon
rather than updating existing styles for.faq-cat-panel:hover
, depending on how the existing CSS was formatted. You can use the default CSS in the previous section as a base and compare that with your current CSS for hover effects to try to find the right combination. - Preview is your friend when testing these CSS changes, or ask our team for a sandbox copy of your current knowledge base to test in!
Use a script
If you don't want to use the merge code, you can use the base-cats template combined with a script to extract the icons. This is a little clunkier but does work.
We strongly encourage you to try the merge code approach though, as it is slightly more accessible for screen readers and much easier to work with for future styling needs.
You can add to your knowledge base's Custom HTML and Custom CSS to extract the category icons and display them!
Before you begin
It's a great idea to have at least one category icon added to a category, so you can confirm the script is working and figure out what style tweaks might be necessary.
To get the category icons displaying on your homepage:
- Go to Settings > Style.
- Below the preview pane, select Custom HTML.
- In the dropdown, select Homepage.
- Copy the script below and paste it into the bottom of the Custom HTML editing pane:
<script> //This script runs on the homepage and looks for category icons added to the category, extracts and displays them. $(function() { $.each($(".faq-cat-panel-container"), function() { var imageURL = $(this).find("input.category-icon-url").val(); $(this).find(".faq-cat-panel").prepend("<div><img class='category-icon' src='"+imageURL+"' alt=''></div>"); }); $('.faq-cat-panel-container').show(); }); </script>
- Now select Custom CSS.
- Copy the CSS below and paste it into your CSS. The
.category-icon
class can be used to style your icons as you'd like--the style here is just an example. You can play with this more or talk to our support team for additional help getting the icons to appears as you'd like!/* Hide the homepage category containers at first, so that the category icon script will display them once they run This prevents a blip where the panels show briefly without the icon */ .hg-home-page .faq-cat-panel-container { display: none; } /* Style the category icon; you can use any variety of CSS here */ .category-icon { max-width: 3em; padding-bottom: 0.5em; }
- You can preview your changes; just be sure you Save them once you're done.
Variations
If you'd like the alt text of the image to be populated by the category title, use this script instead:
<script>
//This script runs on the homepage and looks for category icons added to the category, extracts and displays them.
$(function() {
$.each($(".faq-cat-panel-container"), function() {
var imageURL = $(this).find("input.category-icon-url").val();
var catTitle = $(this).find(".category-header a").text();
$(this).find(".faq-cat-panel").prepend("<div><img class='category-icon' src='"+imageURL+"' alt='"+catTitle+"'></div>");
});
$('.faq-cat-panel-container').show();
});
</script>
KnowledgeOwl offers six article lists that you can use in your knowledge base to help readers find new, updated, popular, recently viewed, required, and relevant content. These lists are automatically generated. Four are added to your homepage or articles by default; the other three are optional lists you can choose to add!
To change the number of articles displayed in each list, see Article List Settings.
Pre-added lists
Popular Articles list
Our Popular Articles List displays articles with the most traffic. This will increase your readers' engagement and your ability to get them the most common answers they might need. This list is added to your homepage by default. Refer to Remove article lists from your homepage if you'd like to remove this list from your homepage.
New Articles list
Our New Articles List displays articles that have been recently created or published. This helps your readers stay aware of newly published content. This list is added to your homepage by default. Refer to Remove article lists from your homepage if you'd like to remove this list from your homepage.
Updated Articles list
Our Updated Articles List displays articles that have recently updated content. This will increase your readers' engagement and your ability to get them the most up-to-date answers they need. This list is added to your homepage by default. Refer to Remove article lists from your homepage if you'd like to remove this list from your homepage.
Related Articles list
Our Related Articles List is used in articles to display articles that have content related to the current article the reader is reading. This will increase your readers' engagement and the your ability to get them the answers they need. This list is added to the article footer by default.
Optional/Feature-specific lists
Favorite Articles list
For knowledge bases that use reader logins and have Article Favorites enabled, the Favorite Articles List will display the articles a reader has chosen to favorite.
Recent Articles list
For knowledge bases that use reader logins, the Recently Viewed Articles List displays the current reader's most recently viewed articles. This will help readers return to articles or categories they have recently viewed. Your homepage or righthand column is an excellent place to add this list.
Required Articles list
For knowledge bases that use reader logins and have Required Reading enabled, the Required Articles List will display all articles marked as required. Readers can click to open articles to acknowledge them, or click the See more... link to navigate to the Required Reading page to view the complete list and see which articles they need to acknowledge.
Our New Articles list allows you to display articles that have been created or published most recently. This list is included by default on the homepage of all new knowledge bases.
How does it work?
KnowledgeOwl will search behind the scenes for the newest articles and display them within the list, with newest displayed at the top. Articles which have the New callout added to them will display before articles which do not have that callout.
A "See more..." link at the bottom of the list will take you to a full page of all New articles, located at /help/new-articles (or /home/new-articles or /docs/new-articles depending on which root path you've chosen). You can see ours here: https://support.knowledgeowl.com/help/new-articles
Out of the box, this list will display five articles. If no articles are available, it will display the text "None". If more than five are available, it includes a "See more..." link after the five articles.
You can choose to display up to 10 articles. You can also change the article list heading, the New Articles page heading, "None", and "See more..." text.
To update any of the text, use the options in Tools > Customize Text in the Article Lists Knowledge Base Section. See Customize Text: Article Lists for more information.
Change number of articles in the list
By default, the five most recent articles will be displayed. You can change this to display between 1-10:
- Go to Settings > Basic.
- Scroll to the Article List Settings section.
- Select the dropdown next to New Articles and select the number of articles you'd like the list to display (1-10).
- Be sure to Save your changes.
In our default themes, the New Articles List is already added to:
- Your knowledge base homepage
- Your 404 error page
- Your default right column HTML
If you'd like to add it somewhere else, or if you've customized the HTML and no longer see the list on the pages listed above, review the directions below to add it! You'll need this merge code: [template("new-articles")]
Add the New Articles list to all articles
You can place the new articles merge code in the HTML of all articles. Go to Settings > Style > Custom HTML and select Article. You can place the merge code after the article body merge code or in the hg-article-footer div.
Either of these locations will display at the bottom of each article.
You'll probably also want to add a header to display above the new article links as well and perhaps a div with a class so that you can style the list. Something like the following should do:
<div class="new-articles">
<h3>[translation("article-lists:new-articles")]
</h3>
[template("new-articles")]
</div>
Add the New Articles list to individual articles
If you only want to display the New Articles list in certain articles you can place the new article merge code at the bottom of individual articles. To do so, edit the article and select the Code View button in the upper left of the editor toolbar:
Scroll to the bottom of the article and paste the merge code.
You'll probably also want to add a header to display above the new article links as well and perhaps a div with a class so that you can style the list.
Something like the following should do:
<div class="new-articles">
<h3>[translation("article-lists:new-articles")]
</h3>
[template("new-articles")]
</div>
If you do this often, you can create a snippet that holds the above HTML and insert the snippet into your article, instead!
Re-add the New Articles list to the right column of your Knowledge Base
If you've removed the New Articles List from the right column of your knowledge base, you can re-add it by copying the relevant HTML from Default Right Column HTML and pasting it into Settings > Style > Custom HTML > Right Column.
Re-add the New Articles list to your homepage
If you've removed the New Articles list from your homepage, you can re-add it to by copying and pasting the relevant HTML from Default Homepage Article HTML into either the code view of the top-level Homepage or into Settings > Style > Custom HTML > Homepage.
Our Recently Updated Articles list allows you to display articles that have recently updated content. This will increase your readers' engagement and your ability to get them the most updated answers they need. By default, we add this list to your homepage but you can use it almost anywhere.
How does it work?
Wherever the updated articles merge code is used, KnowledgeOwl will search behind the scenes to pull a list of the articles with last modified dates, with the most recently updated at the top. Articles which have the Updated callout added to them will display before articles which do not have that callout.
A "See more..." link at the bottom of the list will take you to a full page of all Updated articles, located at /help/updated-articles (or /home/updated-articles or /docs/updated-articles depending on which root path you've chosen). You can see ours here: https://support.knowledgeowl.com/help/updated-articles
Out of the box, this list will display five articles. If no articles are available, it will display the text "None". If more than five are available, it will include a "See more..." link below the articles.
You can choose to display up to 10 articles. You can also change the article list heading, the New Articles page heading, "None", and "See more..." text.
To update any of the text, use the options in Tools > Customize Text in the Article Lists Knowledge Base Section. See Customize Text: Article Lists for more information.
Change number of articles in the list
By default, the five most recently updated articles will be displayed. You can change this to display between 1-10:
- Go to Settings > Basic.
- Scroll to the Article List Settings section.
- Select the dropdown next to Updated Articles and select the number of articles you'd like the list to display (1-10).
- Be sure to Save your changes.
In our default themes, the Updated Articles List is already added to:
- Your knowledge base homepage
- Your 404 error page
- Your default right column HTML
If you'd like to add it somewhere else, or if you've customized the HTML and no longer see the list on the pages listed above, review the directions below to add it! You'll need this merge code:[template("up-articles")]
Add the Recently Updated Articles list to all articles
You can place the updated articles merge code in the HTML of all articles. Go to Settings > Style > Custom HTML and select Article. You can place the merge code after the article body merge code or in the hg-article-footer div.
Either of these locations will display at the bottom of each article.
You'll probably also want to add a header to display above the updated article links as well and perhaps a div with a class so that you can style the updated articles list.
Something like the following should do:
<div class="updated-articles">
<h3>[translation("article-lists:updated-articles")]
</h3>
[template("up-articles")]
</div>
Add the Recently Updated Articles list to individual articles
If you only want to display the updated articles list in certain articles you can place the updated article merge code at the bottom of individual articles. To do so, edit the article and select the Code View button in the upper left of the editor toolbar:
Scroll to the bottom of the article and paste the merge code.
You'll probably also want to add a header to display above the updated article links as well and perhaps a div with a class so that you can style the updated articles list.
Something like the following should do:
<div class="up-articles">
<h3>[translation("article-lists:updated-articles")]
</h3>
[template("up-articles")]
</div>
If you do this often, you can create a snippet that holds the above HTML and insert the snippet into your article, instead!
Re-add the Updated Articles list to the right column of your Knowledge Base
If you've removed the Updated Articles List from the right column of your knowledge base, you can re-add it by copying the relevant HTML from Default Right Column HTML and pasting it into Settings > Style > Custom HTML > Right Column.
Re-add the Updated Articles list to your homepage
If you've removed the Updated Articles List from your homepage, you can re-add it to by copying and pasting the relevant HTML from Default Homepage Article HTML into either the code view of the top-level Homepage or into Settings > Style > Custom HTML > Homepage.
Our Popular Articles List displays articles with the most views. This will increase your readers' engagement and your ability to get them the most common answers they might need. By default, we display this on your homepage.
How does it work?
Wherever the popular articles merge code is used, KnowledgeOwl will search behind the scenes to pull a list of the articles with the highest number of views (as displayed in the Popular Articles Report in Reporting > Dashboard), sorted with the most views at the top. You can also Reset article views in the Popular Articles report.
A "See more..." link at the bottom of the list will take you to a full page of all Popular articles, located at /help/popular-articles (or /home/popular-articles or /docs/popular-articles depending on which root path you've chosen). You can see ours here: https://support.knowledgeowl.com/help/popular-articles
Out of the box, this list will display five articles. If no articles are available, it displays the text "None." If more than five are available, it includes a "See more..." link at the bottom of the list.
You can choose to display up to 10 articles. You can also change the article list heading, the Popular Articles page heading, "None", and "See more..." text.
To update any of the text, use the options in Tools > Customize Text in the Article Lists Knowledge Base Section. See Customize Text: Article Lists for more information.
Change number of articles in the list
By default, the 5 most popular articles (those with the most views) will be displayed. You can change this to display between 1-10:
- Go to Settings > Basic.
- Scroll to the Article List Settings section.
- Select on the dropdown next to Popular Articles and select the number of articles you'd like the widget to display (1-10).
- Be sure to Save your changes.
In our default themes, the Popular Articles List is already added to:
- Your knowledge base homepage
- Your 404 error page
- Your default right column HTML
If you'd like to add it somewhere else, or if you've customized the HTML and no longer see the list on the pages listed above, review the directions below to add it! You'll need this merge code:[template("pop-articles")]
Add the Popular Articles list to all articles
You can place the popular articles merge code in the HTML of all articles. Go to Settings > Style > Custom HTML and select Article. You can place the merge code after the article body merge code or in the hg-article-footer
div.
Either of these locations will display at the bottom of each article.
You'll probably also want to add a header to display above the popular article links as well and perhaps a div with a class so that you can style the list.
Something like the following should do:
<div class="pop-articles">
<h3>[translation("article-lists:popular-articles")]
</h3>
[template("pop-articles")]
</div>
Add the Popular Articles list to individual articles
If you only want to display the Popular Articles List in certain articles you can place the popular article merge code at the bottom of individual articles. To do so, edit the article and select the Code View button in the upper left of the editor toolbar:
Scroll to the bottom of the article and paste the merge code.
You'll probably also want to add a header to display above the popular article links as well and perhaps a div with a class so that you can style the list. Something like the following should do:
<div class="pop-articles">
<h3>[translation("article-lists:popular-articles")]
</h3>
[template("pop-articles")]
</div>
If you do this often, you can create a snippet that holds the above HTML and insert the snippet into your article, instead!
Re-add the Popular Articles list to the right column of your Knowledge Base
If you've removed the Popular Articles List from the right column of your knowledge base, you can re-add it by copying the relevant HTML from Default Right Column HTML and pasting it into Settings > Style > Custom HTML > Right Column.
Re-add the Popular Articles list to your homepage
If you've removed the Popular Articles list from your homepage, you can re-add it to by copying and pasting the relevant HTML from Default Homepage Article HTML into either the code view of the top-level Homepage or into Settings > Style > Custom HTML > Homepage.
For knowledge bases using individual reader accounts, our Recent Articles list displays a reader's most-recently-viewed articles, topic display categories, and custom content categories. These links can help readers return to content where they left off, or content they frequently reference. Your homepage is an excellent place to add this article list, though you can also add it to the right column of your layout, if you're using the right column.
This list only works with individual reader accounts. Knowledge bases with default access set to public, shared passwords, or shared IP addresses will not properly populate this list.
How does it work?
To set up, you'll add the merge code for the list where you'd like the information to be displayed. Behind the scenes, KnowledgeOwl will track up to ten of the most recently viewed articles, topic display categories, and custom content categories for each reader, and display those back to the reader in the article list.
Articles are displayed with a document icon; topic display and custom content categories are displayed with a folder.
The Recent Articles list will not show:
- Default categories
- Blog style categories
- URL redirect categories
- Articles set with URL redirects
With topic display categories, if you have the option set to Override Article Links (so that opening an article always opens it within the topic display category), when a reader views an article in the category, both the topic display category and the article will appear in their recent articles list.
Setup
By default, the reader's five most recently viewed articles will be displayed. You can change this to display between 1-10:
- Go to Settings > Basic.
- Scroll to the Article List Settings section.
- Select the dropdown next to Recent Articles and select the number of articles you'd like the list to display (1-10):
- Be sure to Save your changes.
We don't add this list to any section of your knowledge base by default.
If you'd like to add it, you'll add two merge codes into either the top-level Homepage or into the Settings > Style > Custom HTML of the relevant layouts:
[translation("article-lists:recent-articles")]
: this merge code grabs the Recent articles list heading in Tools > Customize Text > Article Lists, making it so no one has to edit the code in the future to update the title.[reader("recent-articles")]
: this merge code generates the individual reader's recent articles list.
Different setups are discussed further below.
Add the Recent Articles list to your homepage (Settings > Style)
Most knowledge bases have their article lists set in Settings > Style. If your knowledge base uses this layout, you can follow these instructions to add the Recent Articles list there. (If your knowledge base doesn't show any article lists in Settings > Style > Custom HTML > Homepage, follow the next set of instructions!)
- Go to Settings > Style.
- Below the Preview pane, be sure Custom HTML is selected.
- Select Homepage from the Custom HTML dropdown.
- Near the bottom of the code editor, find the div with class="homepage-widgets row".
- Copy one of the other article lists and paste that code in again.
- Replace the title merge code with:
[translation("article-lists:recent-articles")]
- Replace the list merge code with:
[reader("recent-articles")]
- Your code should now look something like this:
<div class="homepage-widgets row"> <div class="col-md-4 col-sm-6"><h3>[translation("article-lists:popular-articles")]</h3>[template("pop-articles")]</div> <div class="col-md-4 col-sm-6"><h3>[translation("article-lists:new-articles")]</h3>[template("new-articles")]</div> <div class="col-md-4 col-sm-6"><h3>[translation("article-lists:updated-articles")]</h3>[template("up-articles")]</div> <div class="col-md-4 col-sm-6"><h3>[translation("article-lists:recent-articles")]</h3>[reader("recent-articles")]</div> </div>
- You can Preview your changes to be sure they look right.
- Be sure to Save your changes once you're done!
Add the Recent Articles list to your homepage (top-level Homepage)
There are two ways to do this, depending on how your knowledge base is set up. If you're using our older homepage:
- In the top lefthand navigation, go to Homepage.
- Copy one of the other homepage lists and paste it in again.
- Replace the title with this merge code:
[translation("article-lists:recent-articles")]
- Replace the merge code with:
[reader("recent-articles")]
- Save.
Add the Recent Articles list to all articles
You can place the recent articles merge code and title in the HTML of all articles. To do so, it's best to create a div and add the title within a header and the article list merge code below that. We provide a code sample below you can copy and paste and adjust as you'd like:
- Go to Settings > Style
- Be sure the Custom HTML tab is selected.
- Select Article from the Custom HTML dropdown.
- Copy the code below:
<div class="recent-articles text-center"> <h3>[translation("article-lists:recent-articles")]</h3> [reader("recent-articles")] </div>
- Paste it in wherever you'd like. We recommend placing this in the hg-article-footer div, either above or below the Related Articles section:
- Once you're done adding the merge code, text, and any Custom CSS to style it, be sure to Save.
Add the Recent Articles list to individual articles
If you only want to display the Recent Articles list in certain articles, we recommend creating a snippet that includes the recent articles merge code and whatever additional formatting you'd like, and then adding that to the individual articles where you'd like the list displayed.
This helps standardize the appearance of the list, regardless of where it's added.
To do so:
- Go to Library > Snippets.
- Select the + Create New Snippet button.
- Give your snippet a Snippet Name and Snippet Description.
- In the Snippet Content, create the layout you'd like for the list (usually a heading, etc.). Add the merge code for both the list and the list heading into it. Here's a sample:
- Once you're satisfied with your snippet, select Create.
- With the snippet created, you can add the snippet into any article using the Insert Snippet option in the editor.
Add the Recent Articles list to the right column of your Knowledge Base
If you're using an older theme that shows the right column, you might decide to display the Recent Articles list in the right column of your knowledge base. To do so:
- Go to Settings > Style.
- Be sure the Custom HTML tab is selected.
- In the Custom HTML dropdown, select Right Column.
- Copy the code below and paste it in where you'd like. We recommend putting it before or after one of the existing article lists:
<div class="panel panel-default right-col-panel recent-panel"> <div class="panel-heading">[translation("article-lists:recent-articles")]</div> [reader("recent-articles")] </div>
- Be sure to Save your changes.
By default, your knowledge base includes three article lists on the homepage: Popular Articles list, New Articles list, and Updated Articles list.
You can remove any of these article lists.
The steps to follow depend on how old your knowledge base is.
Remove from Style Settings
In most knowledge bases, the articles are coded into the raw HTML in the Settings > Style page. To remove one or more article lists from your homepage:
- Go to Settings > Style.
- In the Customize HTML, CSS, and JS section, select Custom HTML.
- In the Select HTML section to edit dropdown, select Homepage.
- The article lists HTML begins at row 9:
<div class="ko-homepage-top"> <h1 class="hg-article-title xcolor">[homepage("title")]</h1> [template("large-search")] </div> <div class="hg-article"> <div class="hg-article-body"> <div>[template("icon-cats,max=8,col=4,desc=0")]</div> <div>[homepage("body")]</div> <div class="homepage-widgets row"> <div class="col-md-4 col-sm-6"><h3>[translation("article-lists:popular-articles")]</h3>[template("pop-articles")]</div> <div class="col-md-4 col-sm-6"><h3>[translation("article-lists:new-articles")]</h3>[template("new-articles")]</div> <div class="col-md-4 col-sm-6"><h3>[translation("article-lists:updated-articles")]</h3>[template("up-articles")]</div> </div> </div> </div>
- To delete the entire article lists section, delete all of rows 9-13. So your HTML would now look like this:
- To delete only one of the of the article lists, delete the row it's on from rows 10-12. So if we deleted the Popular Articles list only, our HTML might look like this:
<div class="ko-homepage-top"> <h1 class="hg-article-title xcolor">[homepage("title")]</h1> [template("large-search")] </div> <div class="hg-article"> <div class="hg-article-body"> <div>[template("icon-cats,max=8,col=4,desc=0")]</div> <div>[homepage("body")]</div> <div class="homepage-widgets row"> <div class="col-md-4 col-sm-6"><h3>[translation("article-lists:new-articles")]</h3>[template("new-articles")]</div> <div class="col-md-4 col-sm-6"><h3>[translation("article-lists:updated-articles")]</h3>[template("up-articles")]</div> </div> </div> </div>
Resize remaining lists
If you want to remove one list and have the others expand to use more space, changecol-md-4
tocol-md-6
for each remaining article list. - Be sure to Save your changes to make them live!
<div class="ko-homepage-top">
<h1 class="hg-article-title xcolor">[homepage("title")]</h1>
[template("large-search")]
</div>
<div class="hg-article">
<div class="hg-article-body">
<div>[template("icon-cats,max=8,col=4,desc=0")]</div>
<div>[homepage("body")]</div>
</div>
</div>
Remove from Homepage content editor
If your Homepage Custom HTML doesn't look like that in the samples above, your article lists are probably in the Homepage content editor. Go to the top-level Homepage option in the left navigation and use the editor to delete the article lists from the Homepage content editor.
By default, your knowledge base comes with three article lists on the homepage:
You can also add a Recent Articles list to your homepage. But what if you'd like to build your own list?
Learn how to build a homepage articles list that populates with articles assigned a specific tag, using an API Snippet. It can be useful for setting up Frequently Referenced articles, Quick Links, and so on.
Before you begin
You must have at least one active API key in your account with ONLY GET permission to use this functionality. To retrieve / generate a KnowledgeOwl API key, have an account administrator go to to Your Account > API and create/verify that a GET-only API key exists. Refer to API keys for more information.
Step 1: Create your tag and add it to articles
In order to have a list that pulls all articles with a particular tag, the tag needs to exist and needs to be assigned to articles.
You can create a tag any time on the fly by opening an article in edit mode and typing into the Tags section. Once you save, the tag is created and assigned to the article.
You can see all tags in your knowledge base by going to Library > Tags.
Step 2: Get your tag's ID
Once your tag has been created, you'll need to know its tag ID, which is a unique identifier for that tag. We use the ID here in case the tag is ever edited--the ID won't change even if the spelling of the tag does.
There are few ways to get your tag's ID. The fastest way is to go the Tags Library and inspect the tag. We offer instructions on how to do that below. (If you have an API key and you're comfortable using it, you can make an API call to the tag endpoint to get it.)
Getting the tag ID from the Tags Library
To get the tag ID from the Tags Library, we'll use your browser's built-in Inspect option to look at the code in the page.
- Go to Library > Tags.
- Right-click on the tag whose ID you want to get and select Inspect.
- This will open some element details for the tag in a different pane. Look two rows up from the tag-pill with the text of the tag you selected. The value listed there is the tag ID:
- Copy and paste this tag ID somewhere for later.
Step 3: Create a snippet that looks up articles for your tag
Now the real fun begins. We'll create an API snippet that will pull the list of articles that have that tag assigned, so it can be displayed in a list on the homepage:
- Go to Library > Snippets.
- Select the + Create New Snippet button.
- Give your snippet a name. In this example, since I'm using the tipsandtricks tag, I'll call it tipsandtricks Articles.
- The Merge Code Name will be automatically generated from the snippet name. You can edit it if you'd like.
- Add a description so you remember what this snippet does.
- Select the Snippet Content editor, which should say WYSIWYG Editor, and select Code Editor instead.
- Once in Code Editor, copy and paste the code below into the editor:
<ul class="list-unstyled stat-list" id="<name>"> </ul> <script> $(function(){ //get all articles inside $.get('[ko_api(article|{"project_id": "%cur_kb_id%", "tags": {"$in":["<tag-id>"]},"status": {"$in": ["published", "review"]}, "_fields": ["url_hash","name"],"sort": {"name": 1}})]', function(data) { if(data && data.data && data.data.length > 0) { $.each(data.data, function(index, article){ $("#<name>").append('<li><div><a href="/help/'+article.url_hash+'">'+article.name+'</a></div></li>') }); } }).fail(function(error) { //failed }); }); </script>
- In row 1, replace
<name>
with a label or name that makes sense for your list. Be sure you keep the quotes around it. So if I'm creating this for my tips and tricks, I might useid="tips"
. - Use that same name in row 12, where it says
$("#<name>")
. Be sure to keep the quotes and the # in front of it. So if I usedid="tips"
for the first one, I'll use$("#tips")
here. - In row 8, replace
<tag-id>
with the tag ID you copied in Step 3. Keep it in "quotes". - In row 12, if your knowledge base URL ends in something other than /help (such as /docs or /home), update the <a href="/help/' portion to have the correct location. Replace "/help' with "/home' or "/docs' as appropriate.
- Here is what my complete snippet looks like for my tipsandtricks tag. In my case, the knowledge base I'm in was using /docs, so I updated row 12 to reflect that change:
- Optional: if you'd like this list to only be displayed to certain groups, use the Restrict to Reader Groups checkboxes in the right panel to choose the groups to show it to.
- Once you've finished making changes, select the Create button to create and save your snippet.
Step 4: Test your snippet
To test that your snippet is working:
- Create a new article.
- Add the snippet to your article.
- Publish the article and view it. If your snippet is working, you'll see a list of the articles with the tag you used. If it's not working, be sure you have at least one API key, and be sure that the a href path matches your knowledge base. Reach out to our support team if you're having issues.
Step 5: Add your snippet to your homepage
Now that all the architecture is built for the list, let's add it to the homepage. How to do this depends on where you'd like to add the list:
- If you'd like to add the list in with your existing article lists, or replace one of those article lists, follow the instructions to Update the Homepage Custom HTML.
- If you'd like to add the list below the categories on the homepage but above all the other lists, follow the instructions to Update the Homepage content.
- If you're using an older theme with a Right Column and you'd like to add the list there, follow the instructions to Update the right column.
Update the Homepage Custom HTML
If your knowledge base is not using the [homepage("body")] template, you can add the snippet merge code for your API snippet directly into the Custom HTML. You'll need to reference the snippet's Merge Code Value:
- Go to Library > Snippets.
- Open the snippet you created for this list.
- Copy the snippet's Merge Code Value.
- Go to Style > Settings.
- Be sure Custom HTML is selected.
- Select Homepage from the Custom HTML dropdown.
- Paste the merge code into an appropriate div, paragraph, or whatever you'd like here. If in doubt, you can copy the HTML for one of the other lists, swap out the titles, and replace the article list's template merge code with the snippet merge code.
Update the Homepage content
If you want to place this list in your homepage's body content within the [homepage("body")] template, rather than editing the Custom HTML directly, it is easier to edit the homepage content itself. To do so:
- Select Homepage from the lefthand navigation.
- Create a heading for the section, like "Tips & Tricks".
- Use the Insert Snippet option to insert your snippet merge code beneath the heading.
- You can Preview the changes if you'd like, but be sure you click Save to save them!
If something in the format doesn't look correct, you can switch to Code View here, copy the HTML for one of the other lists to ensure it matches, paste it, and then update it with the snippet merge code and title of your choice!
Update the right column
If you want to add the new list into your Homepage Right column:
- Go to Library > Snippets.
- Click on the snippet you created for this list.
- Copy the snippet's Merge Code Value and paste it somewhere where you can find it.
- Go to Settings > Style.
- Select Custom HTML > Right Column.
- Wherever you'd like to add the list, copy the code below and paste it into that HTML:
<div class="panel panel-default right-col-panel <custom-panel>"> <div class="panel-heading"><list-title></div> <snippet-merge-code> </div>
- In row 1, replace
<custom-panel>
with a label for this panel that makes sense (I used "tip-panel"). Be sure that you leave the closing quotation mark. - In row 2, replace
<list-title>
with the title you'd like displayed (I used Tips & Tricks). - In row 3, replace the
<snippet-merge-code>
with the merge code you copied in Step 3. - So if I adjust this for my Tips & Tricks setup, it might look like this:
- Save your changes.
<div class="panel panel-default right-col-panel tips-panel">
<div class="panel-heading">Tips & Tricks</div>
</div>
Use Cases
You can use lists like this to provide curated lists of content on your homepage that will update dynamically based on a tag being added to or removed from articles. In internal knowledge bases, these can be a great way to put frequently-referenced articles on your homepage. In software support knowledge bases, these can be a great way to highlight documentation from your latest release. We've also seen customers use these for Announcements.
You can replace all the out-of-the-box homepage article lists, or just one, or add additional lists (though you may have to play with formatting for more than 3 to look good).
Have you added a custom article list to your homepage? Share your use case with us!
It can be helpful to add a banner or announcement to your homepage to draw attention to outages, changes in policy/procedure, or to highlight certain content. There are a number of ways to do this, but here we'll use a fairly straightforward approach: using your knowledge base's existing div styles.
The fastest way to create this banner and get it looking exactly how you want is to use our built-in div styles in the article editor, create the banner exactly how you'd like, and then copy that raw HTML and paste it straight into your theme.
If that sounds intimidating, don't worry, let's walk through it step by step!
Step 1: Create your div
First things first: let's use the article editor to create and style the div we want to use.
- Open an article in edit mode (we find it easier to create a new article for this so it's empty of any other code, but do whatever you feel comfortable with!).
- In the editor controls, select the magic wand next to the text formatting controls to view Div Style:
- Select the div style you want.
- With your div added to the editor, type whatever text and use the regular editor controls to insert hyperlinks and other formatting.
- Then, select the </> Code View button in the editor to switch to Code View.
- Copy the HTML code for the div you created. For example, mine looks a bit like this:
<div class="alert alert-success"> <p><strong>Stay informed</strong> <br>Read our latest <a href="/help/release-notes">release notes</a>!</p> </div>
Step 2: Add to your homepage
Congratulations, you now have a fully-formed div in HTML format! Now we'll add this into the homepage itself:
- Go to Settings > Style.
- Below the preview pane, be sure Custom HTML is selected.
- In the Custom HTML dropdown, select Homepage.
- This page is going to look a bit different depending on how you've customized your knowledge base, so you may need to play with positioning a bit to get the look you want.
- For our standard layout, most often we see people put an announcement banner below the search bar and above the category panels, so that's what we'll do in this example.
- To add the banner here, look for the
<div class="hg-article-body>
. - Add a new line between the hg-article-body div and the icon-cats template (or the homepage body template if that comes first in your Homepage HTML).
- Paste your HTML onto that line.
- So the Custom HTML should now look a little like this, with the new div at rows 7-10 (though your div is probably a bit different!):
<div class="ko-homepage-top"> <h1 class="hg-article-title xcolor">[homepage("title")]</h1> [template("large-search")] </div> <div class="hg-article"> <div class="hg-article-body"> <div class="alert alert-success"> <p><strong>Stay informed</strong> <br>Read our latest <a href="/help/release-notes">release notes</a>!</p> </div> <div>[template("icon-cats,max=8,col=4,desc=0")]</div> <div>[homepage("body")]</div> <div class="homepage-widgets row"> <div class="col-md-4 col-sm-6"><h3>[translation("article-lists:popular-articles")]</h3>[template("pop-articles")]</div> <div class="col-md-4 col-sm-6"><h3>[translation("article-lists:new-articles-heading")]</h3>[template("new-articles")]</div> <div class="col-md-4 col-sm-6"><h3>[translation("article-lists:updated-articles")]</h3>[template("up-articles")]</div> </div> </div> </div>
- You can Preview your changes to be sure they look good. If you're comfortable with HTML, you can make tweaks here, or head back to the article editor to re-create your div.
- Once you like the look of it, be sure to Save your changes.
Alternatives
If you have some HTML skills, you can also design your own div rather than using the default styles of the call-outs. Create a div and specify a background color, padding, etc. You can include a graphic or icon, as well. So, for example, this code:
<div style="background-color: #a5edef; color: #7f0707; padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; text-align: center;">
<img src="https://dyzz9obi78pm5.cloudfront.net/app/image/id/5e5d6e4c8e121c80424f245f/n/lightbulb-linus200px.png" style="max-height: 50px;" class="fr-fic fr-dii">Read our latest <a href="/help/covid-19">COVID-19 Updates</a>.
</div>
Produces this:
Formatting your div
For simplicity's sake, we used in-line styles in the HTML example here. You can always use Custom CSS and classes.
Do you want to add an icon with text to your homepage? This can be a great way to encourage people to jump to a particular category or resource or encourage awareness of specific issues or content.
In this example, we walk through creating a snippet that contains a div with a Font Awesome icon, some text, and a link to content in your knowledge base. You can then add that snippet to your homepage to display it.
The end-result will look something like this:
Create the snippet
- Go to Library > Snippets.
- Select the + Create New Snippet button.
- Enter a Name for your snippet. The Merge Code Name is automatically calculated from the name.
- Enter a Snippet Description. When anyone tries to insert a snippet using the editor, this description will be shown to them, so make it useful.
- Select the Snippet Content dropdown and select Code Editor.
- Copy the code below and paste it into the editor window:
<div class="homepage-callout-icon"> <!--Adjust the URL below to point to the location you want to use --> <a href="/help/breaking-news"> <!--FontAwesome icon. Can be replaced with code for other FA icons --> <i class="fa fa-life-ring" aria-hidden="true"></i> <!--Text you want displayed below the icon--> <div>Breaking News!</div> </a> </div> <style> /* Style for icon */ .homepage-callout-icon i { max-width: 240px; color: #A1222F; font-size: 48px; } /* Style for hyperlink text */ .hg-minimalist-theme div.homepage-callout-icon a { color: #A1222F; } /* For next section, choose one alignment and remove/comment out the other two Left is used as default */ /* Center*/ /*.homepage-callout-icon { text-align:center; margin: 20px 0; }*/ /* Left */ .homepage-callout-icon { display: inline-block; text-align:center; margin: 20px 0; } /* Right */ /* .homepage-callout-icon { display: inline-block; text-align:center; margin: 20px 0; float: right; }*/ </style>
- In row 3, change the
href="/help/breaking-news"
to reference the URL you'd like this section to point to. If it's within your knowledge base, you only need to use the relative URL (/help/, /home/, or /docs/ with the URL of the specific article or category). - In row 5: we use a Font Awesome life preserver ring icon. To change this:
- Head to the free Font Awesome icons.
- Browse or search for an icon you'd like to use.
- Select it and copy the HTML it displays for the icon.
- Replace the HTML in row 5 with the HTML you copied from Font Awesome.
- In row 7: Update the text you want displayed with the icon by editing this line.
- In row 14, change the color and size of the icon by adjusting the styles for
.homepage-callout-icon i
. - In row 19, change the color of the text font by changing the color for
.hg-minimalist-theme div.homepage-callout-icon a
. - Rows 22-42: Choose one of the alignment options and delete or comment out the other two. In our sample, we have used the Left alignment and commented out the other two. But you can change the commenting and delete the alignments you don't want.
- Optional: If you'd like the linked icon and text to be visible only to certain reader groups, select those reader groups using the boxes in the Restrict to Reader Groups section.
- When you're done making adjustments, select Create.
Here's a completed snippet using the "Center" align with a newspaper icon and text "Latest Releases!" and the colors changed to a dark blue:
<div class="homepage-callout-icon">
<!--Adjust the URL below to point to the location you want to use -->
<a href="/docs/release-notes">
<!--FontAwesome icon. Can be replaced with code for other FA icons -->
<i class="fa-regular fa-newspaper"></i>
<!--Text you want displayed below the icon-->
<div>Latest Releases!</div>
</a>
</div>
<style>
/* Style for icon */
.homepage-callout-icon i {
max-width: 240px;
color: #1d284f;
font-size: 48px;
}
/* Style for hyperlink text */
.hg-minimalist-theme div.homepage-callout-icon a {
color: #1d284f;
}
/* Center*/
.homepage-callout-icon {
text-align:center;
margin: 20px 0;
}
</style>
Add the snippet to your homepage
- Copy the Merge Code Value of the snippet.
- Go to Settings > Style.
- Below the preview pane, select Custom HTML.
- Select Homepage from the dropdown.
- Paste the merge code value where you'd like it to appear in your homepage. This may take some trial and error.
- To place it below the search bar but above the category icons, enter it on a new line between the hg-article-body div and the div with the icon-cats template in it, for example, here it is in row 7:
<div class="ko-homepage-top"> <h1 class="hg-article-title xcolor">[homepage("title")]</h1> </div> <div class="hg-article"> <div class="hg-article-body"> <div>
</div> <div>[homepage("body")]</div> - To place it between the title and the search bar, enter it on a new line between the h1 with the homepage title merge code and the large-search template, for example, here it is in row 3:
<div class="ko-homepage-top"> <h1 class="hg-article-title xcolor">[homepage("title")]</h1> </div> <div class="hg-article"> <div class="hg-article-body">
- To place it below the search bar but above the category icons, enter it on a new line between the hg-article-body div and the div with the icon-cats template in it, for example, here it is in row 7:
- Save your changes.