Multiple views in Open Social applications

<?xml version="1.0" encoding="UTF-8"?>
<Module>
  <ModulePrefs title="Multiple Views Example">
    <Require feature="opensocial-0.8"/>
  </ModulePrefs>
  <Content type="html" view="profile"><![CDATA[
<h1>Profile Content</h1>
]]></Content>
  <Content type="html" view="canvas"><![CDATA[
<h1>Canvas Content</h1>
]]></Content>
</Module>

Other Combinations:

<Content views="canvas, home">

This means the contained content will be displayed for both ‘‘canvas’’ and ‘‘home’’ views.

<Content>

This will be the default content displayed for all views not specified with a views=”XX” tag.

<Content views="profile">

If this is the only content tag in your XML application, it means that the application will only be shown in the user’s profile and not other possible views.

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.