Embedding Vizit on a Non-SharePoint Page

Adding Vizit's Script to a Page

To add Vizit to a non-SharePoint page, add the following script tags to your page. Any VIZIT_SETTINGS objects should be added BEFORE these script tags are included. Any use of the Vizit namespace should be add AFTER these script tags are included. Note the "ver" query string parameter at the end of the path to vizit-all.js. This should correspond to the version of Vizit that is currently installed. Any time you upgrade Vizit, this value should be updated. It allows any clients that have cached previous versions of our JavaScript to request the most current version.

<script src="http://path/to/_layouts/vizit/Vizit.Core/Endpoints/ResourceEndpoint.ashx?op=Settings&variable=vizitsettings" type="text/javascript"></script>
<script src="http://path/to/_layouts/vizit/vizit-all.js?ver=5.3.0.1557" type="text/javascript"></script>
// <![CDATA[ var VIZIT_SETTINGS = { apiVersion: 2, renderTo: 'viewerpanel', sidebarActions: [ 'ToggleSocial', 'ToggleSearchTerm' ], isSearchPage: false }; // ]]>

Vizit.Write

Vizit.Write places buttons and Instant Previews on the page. They automatically link to the main Essential window on the page. If there are multiple Essential windows, you can target a specific window by specifying its ID in the second parameter. For more detailed information about Vizit.Write, see our documentation: http://files.vizit.com/public/docs/5.3/symbols/Vizit.html#Write

<script type="text/javascript">
// With a title Vizit.Write(
"http://social.vizit.com/sites/zendesk/Shared%20Documents/01-Doing_more_with_less.pdf",
"Doing more with less"
);

// Without a title
Vizit.Write(
"http://social.vizit.com/sites/zendesk/Shared%20Documents/Cobra%20Employer.pdf"
);

// Using the more robust configuration parameter to target another Essential window
Vizit.Write(
"http://social.vizit.com/sites/zendesk/Shared%20Documents/InformationWeek-Rebooting-the-antisocial-network_9919861.pdf", {
essential: {
width: 200,
height: 300,
displayMode: 'FitPage',
bottomBar: {
leftActions: [],
rightActions: []
},
sidebarActions: [ 'ToggleSearchTerm' ]
},
text: 'Click Me!'
});
</script>

// <![CDATA[ Vizit.Write("http://social.vizit.com/sites/zendesk/Shared%20Documents/01-Doing_more_with_less.pdf", "Doing more with less"); // ]]>

// <![CDATA[ Vizit.Write("http://social.vizit.com/sites/zendesk/Shared%20Documents/Cobra%20Employer.pdf"); // ]]>

// <![CDATA[ Vizit.Write( "http://social.vizit.com/sites/zendesk/Shared%20Documents/InformationWeek-Rebooting-the-antisocial-network_9919861.pdf", { essential: { width: 200, height: 300, displayMode: 'FitPage', bottomBar: { leftActions: [], rightActions: [] }, sidebarActions: [ 'ToggleSearchTerm' ] }, text: 'Click Me!' }); // ]]>

// <![CDATA[ // ]]>

Embedded Essential Window with VIZIT_SETTINGS

As mentioned before, this VIZIT_SETTINGS object must be placed on the page before the script is included. For more information about VIZIT_SETTINGS, see our documentation: http://files.vizit.com/public/docs/5.3/symbols/VIZIT_SETTINGS.html. In addition to the properties listed there, any properties that can be applied to the Vizit.Essential.Controller can be used. See the documentation for the Vizit.Essential.Controller: http://files.vizit.com/public/docs/5.3/symbols/Vizit.Essential.Controller.html

<script type="text/javascript">
var VIZIT_SETTINGS = { apiVersion: 2, renderTo: 'viewerpanel', sidebarActions: [ 'ToggleSocial', 'ToggleSearchTerm' ], isSearchPage: false };
</script>

For a full list of actions that can be used in sidebarActions (as well as the other toolbars), see the documentation: http://files.vizit.com/public/docs/5.3/symbols/Vizit.Essential.Actions.html

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk