Localisation of pages
Issue #111
closed
Institute mechansims to simply allow localistion of pages between systems (siemis, kemis, rmi...)
Comments (2)
-
reporter -
reporter - changed status to closed
merged issue111
- Log in to comment
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 tomvc
So we'll haveviews/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 todefault
)2) The base class for Mvc pages will be extended to include new properties and methods:
InstanceContext
- returns the context from Web.ConfigIsInstanceContext(contextName)
boolean, true if the current context matches contextNameIsInstanceContext( string [] contexts)
boolean, true if the current context matches any value in the arrayExample:
web.config:
razor markup:
result: