Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

Customization

Max Toro edited this page May 19, 2013 · 8 revisions

Settings

Use the AccountConfiguration class to customize the behavior of MvcAccount. See the Installation Instructions for more info.

CSS

To use a 2 column tabular display for the forms use this CSS:

.MvcAccount form > div { display: table-row; }
.MvcAccount form > div > div { display: table-cell; padding: .2em .5em; }
.MvcAccount form > div.buttons > div { padding-top: 1em; }

To use a colon after the label text use this:

.MvcAccount form label[for]:after { content: ":"; }

You can customize a specific view using a CSS class named like the view model, but hyphen-separated:

.MvcAccount-Web-Auth-SignInViewModel form > div > div:first-child { text-align: right; }

Views

MvcAccount includes all Razor views embedded as assembly resources. Embedded views can be individually overridden by files views in your project.

To extract all views use the Extract-Views command, using the same value of baseRoute (used at registration) for the -ViewsDirectory parameter.

Resources

You can override individual resources, like error messages, display names, text in HTML elements like <h1> and <title>, for any particular culture, by using global resource files. Here's how it works:

  1. Create a resource file in ~/App_GlobalResources.
  2. Set AccountConfiguration.ResourceClassKey to the name of the resource file, minus the culture and extension.

For a list of resource names see this.

Clone this wiki locally