Setting advanced portal options
You can customize the behavior of Portal for ArcGIS using a configuration file. Properties you can set include whether certain links and buttons are shown in the website, for example, media links or a button that allows anonymous users to create portal accounts.
You may be motivated to do this if you are Configuring a disconnected deployment or are modifying the portal's behavior to match the requirements of your organization; for example, the following organizations might configure their portal as such:
- Defense Industry/Federal Government: Configure the entire portal to use local resources, add security banners, disable anonymous users from creating accounts, and disable forums, blogs, and sharing to social media.
- Local Government: Add security banners, disable forums, and set the extent service to use a local projection.
- Commercial: Enable forums, blogs, and sharing to social media.
The configuration file is located in <Portal for ArcGIS installation directory>\webapps\arcgis#home\js\esri\arcgisonline\config.js.bak. It's recommended that you make a backup copy of this file before modifying it.
After you modify the properties in the file, you'll need to restart your portal to apply the changes. For full instructions, see Stopping and starting the portal.
Even though there is a file named config.js in this directory, you should make your edits to config.js.bak. The changes are pushed into config.js when you restart Portal for ArcGIS.
Once you modify the advanced properties in config.js.bak, you are responsible for maintaining your modifications throughout the lifecycle of the product. For example, if you install a patch or system update on your portal, it is not guaranteed that the properties you modified will persist in the file. As a safeguard, you should keep a copy of the config.js.bak file in case your modifications are lost or overwritten.
The configuration file contains other code that should not be modified. When you open the configuration file, you'll want to navigate to the section of the file that contains modifiable properties. Some of the properties in the portal configuration file are self-explanatory, but some selected properties are described in more detail below. The properties are listed in alphabetical order.
Properties in the configuration file
addContentSecurityText—If not null, the text specified will be shown in the Search for layers to add dialog box when searching a GIS server to add layers to the map. The dialog box displays every time the user executes a search on a GIS server. The text can warn users about security constraints related to the content, for example, For internal use only; do not distribute. The default is null.
bitlyUrl—If not null, short URLs for Facebook, Twitter, and URL map links will be used. If null, Twitter and Facebook links will not be available. To use this property, you'll need to specify the full Bitly URL login and apiKey, such as http://api.bit.ly/v3/shorten?login=<loginName>&apiKey=<key>. The default is null.
bitlyUrlSSL—If SSL is required, specify the full Bitly URL login and apiKey in this property, such as http://api.bit.ly/v3/shorten?login=<loginName>&apiKey=<key>. The default is null.
classificationBanner—Indicates if a security banner will be shown at the top and bottom of every page in the application. The default is false. To display a security banner, specify as true, and then enter the code that defines your banner. The following is an example:
classificationBanner : { "text" : "TOP SECRET", "color":[ 255, 255, 255, 255 ], "font":{ "decoration":"none", "family":"Portable User Interface", "size":16, "style":"normal", "weight":"bold" }, "height" : 5, "backgroundColor":[ 155, 0, 0, 255 ] }
extentService—The service used to update or set the extent of a web map item in the Set Extent dialog box in the portal website. The service must use the WGS 1984 geographic coordinate system with well-known ID (WKID) 4326. The default is http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer.
footerLinks—You can use this property to define links displayed in all page footers. The example below uses the contactUs and reportAbuse types to open an email window. The text in the example is also editable in the dojo localization files (/js/esri/nls/arcgisonline.js and its subdirectories), specifically in the parameters NLS_contactUsSubject, NLS_contactUsBody, NLS_reportAbuseSubject, and NLS_reportAbuseBody. Titles such as ${NLS_termsOfUse} reference the localization parameter NLS_termsOfUse. If you add a new localization parameter name, make sure you also add it to each language file you want to support.
footerLinks: [{ title: "My Organization", url: "http://www.myorganiz.com" }, { title: "${NLS_termsOfUse}", url: "http://www.myorganiz.com/legal/licensing/termsofuse.html" }, { title: "${NLS_privacy}", url: "http://www.myorganiz.com/legal/privacy.html" }, { title: "${NLS_contactUs}", email: "feedback@myorganiz.com", type: "contactUs" }, { title: "${NLS_reportAbuse}", email: "feedback@myorganiz.com", type: "reportAbuse" }],
gcsBasemapService—The service to be used as the basemap for OGC WMS services that do not support the Web Mercator coordinate system. The default is http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer.
longTokenExpiration—When a user signs in to the portal website and selects Keep me signed in, a token is generated with a default expiration time of 20,160 minutes (14 days). If the user does not select the Keep me signed in option when signing in, the tokenExpiration time overrides the time defined in this property.
resourceCenter—Location of ArcGIS Resources website or other desired website. To remove the link from the portal website header, specify this property as null, for example, resourceCenter: null,.
showBlogLink—Indicates whether the blog link is displayed under the Help menu in the portal website. The default is false, meaning the blog link is disabled. To enable the blog link, specify as true and define the URL to the blog in the blog property, for example, blog: "http://myblog.domain.com",.
showForumsLink—Indicates whether the forums link is displayed under the Help menu in the portal website. The default is false, meaning that the forums link is disabled. To enable the forums link, specify as true and define the URL to the forums in the forums property, for example, forums: "http://myforums.domain.com",.
showHelpLink—Indicates whether the help link is displayed under the Help menu. The default is true, meaning that the help link is enabled and opens the portal website help at https://webadaptor.domain.com/arcgis/portalhelp/<language>/website/help/. To disable the help link, specify as false.
showSignUp—Determines whether the Create an account button and account sign-up page (signup.html) are displayed in the portal website. The default is true, meaning that anonymous users have the ability to create user accounts in the portal. To disable the sign-up page, specify as false.
showSocialMediaLinks—Indicates whether or not Facebook and Twitter links are displayed. The default is false, meaning that the links are not displayed. To enable the links, specify this property as true and specify the bitlyURL and bitlyURLSSL properties with the full Bitly URL login and apiKey, for example, "http://api.bit.ly/v3/shorten?login=<loginName>&apiKey=<key>",.
signInHelp—Use this property to override the page opened by the Need help signing in? link on the sign-in page (signin.html). The default is null, meaning that the default page (troubleshoot.html) is displayed by the link. To specify your own page, define the URL to the page that the link will open, for example, signInHelp: "http://machine.domain.com/mysignin.html",.
tokenExpiration—When a user signs in to the portal website, a token is generated with a default expiration time of 120 minutes (2 hours). If the user selects the Keep me signed in option when signing in, the longTokenExpiration time overrides the time defined in this property.
webSearchEnabled—Indicates whether searches on the web (for example, Google searches) are permitted on the content in your portal. The default is true. To disable web searches on your portal's content, specify as false.