|
||
In addition to customizing the default Portal-wide template and web content files, you can provide different templates and web contents (including stylesheets and images) to different user groups. These user groups must have at least view access rights to QPR Portal in order for the custom Portal layouts to work properly.
To specify alternative template and web content locations for groups, modify the portal.ini file (located in C:\ProgramData\QPR Software\QPR 2017\2017.1\Servers\Templates\WAS folder) file in the following way:
[Group1]
WebContentDirectory=Group1WebContents <a path relative to the web content directory path, which is C:\inetpub\wwwroot\qpr2012-2\qprsoftware with Microsoft IIS and the default settings>. For example WebContentDirectory=Group1WebContents or WebContentDirectory=..\Group1WebContents
TemplateDirectory=Group1Templates - <a path relative to the template directory path>. For example TemplateDirectory=Group1Templates or TemplateDirectory=..\Group1Templates
Replace Group1 inside brackets with the name of a user group present in QPR Foundation Server.
Note that the directory defined by TemplateDirectory needs to contain all the subfolders similarly as the default directory. For example, in the case of using "..\Group1Templates" as the value of the TemplateDirectory key, the following folders need to be present together with their contents:
•...\Group1Templates\Booklet
•...\Group1Templates\Booklet\Booklets
•...\Group1Templates\Booklet\Pages
•...\Group1Templates\Common
•...\Group1Templates\Common\DynamicFields
•...\Group1Templates\Common\StaticFields
•...\Group1Templates\PG
•...\Group1Templates\Portal
•...\Group1Templates\SC
Similarly, the WebContentDirectory needs to contain the following subfolders and their contents:
•Common
•Common\scripts
•pg
•pg\images
•pg\scripts
•portal
•portal\help (+ language-specific subfolders)
•portal\images
•portal\pages
•portal\scripts
•sc
•sc\scripts
•sc\webfiles
•stylesheets
Warning: You should never remove the default web content because it is required by a couple of views in QPR Portal.
Minor QPR Portal Content Customization by User Group
If group-specific customization is needed only for some minor QPR Portal content customization, the #UserBelongsTo tag can be used in all QPR Portal templates. The tag has the following parameters:
•user=<User/group ID, FullID or login name> The user/group to use for testing (default value is the current user).
•groups=<A comma-separated list of user(s)/user group(s) ID(s), FullID(s), or login/group name(s) present in the QPR Foundation Server>
•empty=<Result returned if the value of the user parameter is undefined or empty>
•true=<Result returned if the user belongs to the listed users/groups>
•false=<Result returned if the user doesn't belong to the listed users/groups>
The tag will return the value of the 'true' parameter if the user identified by the 'user' parameter (or the current user, if the 'user' parameter isn't given or is empty) matches any user listed in the 'groups' parameter or if the user belongs to any of the groups listed in the 'groups' parameter. Otherwise, the value of the 'false' parameter is returned (or the value of the 'empty' parameter if the 'groups' parameter is empty).