Skip to content

How does the page works

Wayne edited this page Nov 26, 2018 · 5 revisions

The front end pages are created by user. There is no real physical file in the application. But how do these pages work?

Route

Routing plays a vital role in the solution. There a lot of routes in the solution, admin route, front end page route etc. The priority of front end page route is the lowest, and it is a “All Catch” route. It means that, all of the request that have not been handled by other routes, will be handled by front end page route. The request will goes into main action in PageController.

image

WidgetAttribute

WidgetAttribute is use to get the page layout(HTML, Bootstrap grid), widgets, contents.

image

And the attribute decide which layout to use.

image

There are two more attribute for different scenarios.

  • EditWidgetAttribute Be used when design page.
  • ViewPageAttribute Be use when view the history page.

Layout

Front page layout: /ZKEACMS.WebHost/Views/Shared/_Layout.cshtml

Processing flow

Request start /index -> Page exists? No -> 404 : Yes -> Get page layout, widgets, contents etc. -> Render widget contents with layout -> Request end.