Home Page Layout
Your Heretto Portal navigation and home page layout are based on the information provided in a sitemap. A sitemap is a specialized DITA map that enables you to create a structure for your content in Heretto CCMS that Heretto Portal understands and represents in the form of a documentation portal.
Search Boxes Overview
You can enable two search boxes in your Heretto Portal: one in the header and one in the hero section.
Header Search Box
You can modify the styling by editing the .ezd-portal_app-bar_search-wrapper
CSS class.
Alternatively, you can override styling and settings by editing the config.json file. To learn more about editing Heretto Portal settings, refer to Customize the Heretto Portal Settings.
There is a collapsed
state for the appBar
search: .ezd-portal_app-bar_search-collapse
for CSS and appBarSearchCollapse
for config.json. It is used to determine whether or not the search icon has been clicked (desktop) or tapped (mobile) to expose the search bar. You can modify the icon with a CSS class .ezd-portal_app-bar_search-icon
or with appBarSearchIcon
in config.json.
The display and positioning properties for the collapsed
state can be overridden to always show on desktop.
Hero Search Box
The search input in header is typically displayed on tablets and higher-resolution screens. You can hide or modify it by editing the .ezd-portal_hero_search-wrapper
CSS class or the heroSearchWrapper
object in config.json.
Hero Banner
The entire page layout has a global CSS class for the page type being displayed. These classes are applied to the root element of the HTML for globally applied CSS that you may want to specify for certain types of pages.
index-root
-
Typically referred to as the “root page”, “root path”, “home”, or “index” page, etc.
.section-index
-
The first layer of the top-level site sections and potentially a version. For example:
-
/product/2022-r1
-
/customers
-
/content-strategies.
-
.search-index
-
The search page accessible under /search.
.content-index
-
Any other page or URL slug path.
By default, the hero section is shown on all pages. Below, you can see the default settings of the hero section applied in the config.json file.
"hero": {
"position": "relative",
"height": "auto",
"backgroundPosition": "center",
"backgroundSize": "cover",
"marginBottom": "0",
"opacity": 1,
"alignItems": "center",
"alignContent": "center",
"& i18n-message": {
"flex": 1
},
"&.index-root, &.section-index, &.content-index, &.search-index, &.error-index": {
"backgroundImage": "url(https://assets.portal.heretto.com/themes/whitelabel/Geometric-Background.webp)",
},
},
"heroSearchWrapper": {
"height": "2.25rem",
"width": "30rem",
"margin": "0 auto",
[MAX_S]: {
"display": "none"
}
},
However, you can easily override it, for example, to remove the background image throughout different pages or introduce a different image URL:
"hero": {
"height": "350px",
"&.index-root, &.section-index, &.content-index, &.search-index, &.error-index": { "backgroundImage": "none",
},
},
These settings should be always added to the theme
JSON object:
{
"theme": {
"hero": {
"height": "350px",
"&.index-root, &.section-index, &.content-index, &.search-index, &.error-index": {
"backgroundImage": "none",
},
}
}
}
Add Section Tiles
Most important parts of your documentation can be represented with tiles on the Heretto Portal home page.
Tiles can be linked to sections of different complexity. To learn how to manage different types of sections, see Basic Site Section.
A tile is a clickable box that consists of a title, short description, and icon. On larger screens, tiles are displayed in three columns. On mobile devices, tiles are displayed either in two or in one column depending on the resolution
The minimum required to render a tile is a navigational title added within a site section.
Your tile structure has been successfully introduced. Now, edit the contents of the displayed elements.
To edit contents of the data
element that represents tile's icon, do the following:
Go to the home page of your Heretto Portal and refresh it to see the newly created tile.
Add Custom Sections
You can add your own sections on the home page by using the topicgroup
element.
Additional, custom sections can be used to introduce more contextual information about your Heretto Portal like:
your company description
the purpose of your Heretto Portal
icons
videos
div
containers that you can use for customizing displayed modules
By applying the outputclass
attribute to DITA elements in the topics within the topicgroup
, you can style them freely with the CSS code. Each outputclass
value is rendered as an HTML class that can be used as a CSS selector. To learn more about Heretto Portal styling, refer to Customize Heretto Portal Styling.
Additional sections are rendered below the tiles section and above the footer of your home page.
There are no requirements related to the placement of additional sections. If they do not have to be included in the navigation, you can put them anywhere in the sitemap. However, we recommend putting them either at the beginning or at the end of your sitemap to keep its structure neat and tidy.
Go to the home page of your Heretto Portal and refresh it to see the newly created section.
Localize Custom Sections
You can add new sections to your Heretto Portal home page. Section titles are saved as strings that need to be localized. This process also produces a valid structure even if you do not localize your content into multiple languages.
To learn more about adding new sections to the home page, refer to Add Custom Sections.
To explore general rules for strings localization in Heretto Portal, refer to Internationalized Strings Configuration Reference.
Go to the home page of your Heretto Portal and refresh it. You should now be able to see the updated title of the section in a selected language.