SiteLayout Component
Last updated
Last updated
The SiteLayout component is used render the SiteHeader
, main page layout, and the SiteFooter
. It also includes CSS stylesheets and JavaScript files that are important to the look-and-feel ( and )
Following is how the tag is used in pages/[...path].js
, which is responsible for rendering all common documents from the database.
You only need to import the component...
... and then wrap pretty much all the page content with the layout tag...
object definition
layoutName
string
no
Defines the layout to be used. Pass "SidebarRight" for a 75%/25%(ish) two-column layout, otherwise, the default full page layout will be used.
title
string
yes
The page title, which is rendered within an <h1/>
tag atop the page. The page title is not injected into the HTML head's title tag, however. That must be done by another means.
ads
boolean
no
When present and true
, and when the "SidebarRight" layout is also specified for use, the AdComponent
will be rendered at the bottom of the right-hand column.