Test your website performance for free
Test your website performance

Scrivito.CurrentPage

Displays the current page.

The current page is rendered using the component provided for the corresponding page class via Scrivito.provideComponent.

[New in 1.30.0]If present, Scrivito.CurrentPage renders the layout components that have been defined for the classes of the pages that constitute the path of the current page. Layout components can be defined using Scrivito.provideLayoutComponent.

Props

<Scrivito.CurrentPage> does not accept any props.

Remarks

To build a very simple serverless single-page application, it is sufficient to mount the <Scrivito.CurrentPage> component into the DOM. Thus, rendering any page and its widgets boils down to a single JavaScript call, embedded in some HTML boilerplate:

This template omits the code needed to specify the available pages and widgets (defined in widgets_and_pages.js). But this additional code is as simple or as complex as your app requires.