Notes:
This topic applies only to an MVC Web Application. Refer to Creating an MVC Web Application for more information.
A layout page can be applied to pages that are generated dynamically at run time. Such pages are created when a T27 screen is received from the MCP server and has not previously been added to the T27 ePortal data source project, or when a UTS screen is received from the OS 2200 server and has not previously been added to the UTS ePortal data source project.
You specify whether to use a layout page, as well as which layout page to use when you scaffold your views. Refer to Scaffold Unisys View Dialog and Scaffold Unisys View Dialog.
Characteristics of a Layout Page
You can define a layout page that provides an overall container for the pages on your site. For example, the layout page can contain the header, navigation area, and footer. The layout page includes a placeholder where the main content goes.
The filename containing a layout page should start with an underscore (_) character. This ensures that the web site user cannot access the page directly.
When you create an MVC Web application , your project includes some layout files that you can modify for your own needs. The layout files are found in the folder Views\Shared. Refer to Creating an MVC Web Application for more information.
The following layout files are created by default:
_Layout.cshtml – This is a general layout appropriate for most data source types.
_LayoutAbsEae.cshtml – This is a layout optimized for the AB Suite/EAE data source type.
_LayoutUts.cshtml – This is a layout optimized for the UTS data source type, when function keys are required. If function keys are not required, you can use _Layout.cshtml instead.
_LayoutAjax.cshtml - This is a layout appropriate for an ePortal Single Page Application (AJAX) for most ePortal data source types.
_LayoutAjaxAbsEae.cshtml - This is a layout appropriate for a Single Page Application (AJAX), optimized for the AB Suite/EAE data source type.
_LayoutAjaxUts.cshtml – This is a layout appropriate for a Single Page Application (AJAX) optimized for the UTS data source type, when function keys are required. If function keys are not required, you can use _LayoutAjax.cshtml instead.
For information on the ePortal Single Page Application architecture, refer to Choosing a Traditional or Single Page Application.
For information on the use of UTS function keys, refer to Controlling the Look and Feel in a UTS Data Source Project.
In addition, you can create your own layout pages if you wish. For more information about layout pages:
Search for the topic “Creating a Consistent Layout” at the ASP.NET site (http://www.asp.net).
Refer to Best Practices for Scaffolded Presentation Projects for more best practices on layouts.