slug
of the page (for example fr/femme/chemises
).
In Frontstack, every type of content is represented by a page type.
So after defining a page type for each page, you can simply fetch the page by its slug:
page
object contains the page type - e.g. category
, product
, content
, etc. -
which you can use to determine the component to render, whereas data
contains the actual data for the page.
name
or breadcrumbs
)Action | Description |
---|---|
302 Redirect to home | The most common behavior, temporary redirect |
301 Redirect to home | Permanent redirect |
Delete URL | The URL will be deleted and the page will be removed |
Keep the URL and show a 404 | The URL will be kept, but the page will not be found |
Strategy | Description |
---|---|
Append token | Specify a secondary token that will be appended to the slug to make it unique |
Dismiss | Skip the page and don’t create a link |
type
field to determine which page component to render.
Frontstack also passes the underlying block name in the block
field - so if you reuse an existing component, you can use this one as well.
The data
field contains the actual data for the page. Its structure depends on the block configuration.
route
property to the page object. This property contains information about the current route and the possible alternate routes for the page.
alternates
property contains a list of possible alternate (usually localized) routes for the page - used for hreflang tags or to build intelligent language selectors.
It does not contain the current route.
alternates
property will be empty and the redirect
property will contain a list of possible redirects.
The code
property can be used as a response code to pass to the client.
alternates
property to build a list of possible routes for the page - e.g. for hreflang tags or build intelligent language selectors.
Another use case is suggesting a redirect based on the browser language.
parent
or parentId
). A page is required, because the menu item will link to it.
parentId
field and the resulting menu will be:
menu
function with the alias you defined when creating the menu.
rootId
option to the menu
function:
depth
option to the menu
function: