Localisation of pages

Issue #111 closed
Brian Lewis repo owner created an issue

Institute mechansims to simply allow localistion of pages between systems (siemis, kemis, rmi...)

Comments (2)

  1. Brian Lewis reporter

    We'll introduce the concept of context and add this to the AppSettings section of Web.Config.

    Enhancements will be made to MVC routing and MVC base page to handle two cases:

    1) use an entirely different cshtml file in depending on context

    2) tweak the contents of a cshtml to vary dependent on context

    Case 1) :

    Introduce new base folders for each implementation under views, parallel to mvc So we'll have views/rmi views/siemis views/kemis

    Any files that need to be overridden will be placed in the system/specific folder in the parallel location. Mvc will look here before looking in the default folder mvc ( which will get renamed to default)

    2) The base class for Mvc pages will be extended to include new properties and methods:

    InstanceContext - returns the context from Web.Config

    IsInstanceContext(contextName) boolean, true if the current context matches contextName

    IsInstanceContext( string [] contexts) boolean, true if the current context matches any value in the array

    Example:

    web.config:

    Capture3.PNG

    razor markup:

    Capture.PNG

    result:

  2. Log in to comment