Apply VIZIT_SETTINGS Globally

Configuring how Vizit looks and behaves is a very powerful feature of the product. By using the various Vizit Client Library tools, you can specify the size, position, and capabilities of the viewer while also attaching to critical events to provide a more unique experience for your user base. In addition to adding the VIZIT_SETTINGS object to a single page using the Vizit Web Part,  you can use these techniques below to deploy your changes globally within your system:

Add Script to your Master Page

Use SharePoint Designer to add the VIZIT_SETTINGS object in a SCRIPT element to the top-most point in the HEAD of the HTML of your MasterPage. This will affect an entire Site Collection. This requires no knowledge of the SharePoint deployment process, but can be limiting if you wanted to be more targeted in your distribution. Here is an example SCRIPT block: 

<script type="text/javascript">
var VIZIT_SETTINGS = {
apiVersion: 2,
width: 300,
height: 500
};
</script>

Using a SharePoint ScriptLink CustomAction

  1. Create a SharePoint Feature that has a ScriptLink CustomAction. This can be scoped at the Farm, WebApplication, Site, or Web levels. You can find out more about CustomActions here: http://msdn.microsoft.com/en-us/library/ms460194.aspx

    Here is an example of a CustomAction:

    <CustomAction
    Id="YourCompany_Vizit_Settings"
    Location="ScriptLink"
    Sequence="100"
    ScriptSrc="~site/_layouts/MyVizitSettings.js?ver=1.0"
    /> 

    This would require knowledge of SharePoint Feature and Solution creation and deployment, but offers distribution options that are only limited by the capabilities of SharePoint.
  2. In your solution file, create the MyVizitSettings.js file and place it in the mapped LAYOUTS folder. The contents of the MyVizitSettings.js file should be the following:

    var VIZIT_SETTINGS = { 
    apiVersion: 2,
    width: 300,
    height: 500
    };

Note: By not specifying an "id" property in the VIZIT_SETTINGS object, your configuration will be used by all the Vizit Buttons and Instant Previews on the page, automatically. 

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk