Small View
The Small View of an application appears to end users as a module contained within a Web page. As the application's teaser, the purpose of the Small View is to draw end users into the Canvas View, which provides a richer interaction.
The content of the Small View is up to you, but usually a Small View contains information such as the following:
- One or more triggers to launch the Canvas View.
- A representation of the user, such as a name and an image. Your application can get this information from the user's Yahoo! Profile.
- Status or Updates about other end users that will encourage the user running the Small View to open the Canvas View.
- Default: The end user has not signed in to Yahoo! or
has not installed the application.
In this state, the Small View should encourage the user
to install the application and try it out.
To define the code for the default state, in the Project Details page, enter HTML or YML in the Small View Default Content field. Other markup or programming languages are ignored. This code is stored on a server within YAP and is the same for all end users. At runtime, YAP renders the Small View's default code if the personalized state for the end user is not available.
- Personalized: The end user is signed in to Yahoo! and
has installed the application.
To personalize the Small View, an application calls the
setSmallViewmethod of the Yahoo! Social SDK for PHP This method enables you to tailor the Small View for each end user (identified by GUID) and to dynamically update the Small View. You can use this method wherever you can run the PHP SDK, for example, in the Canvas View and back-end processes.
Small Views have the following constraints:
- The size of a Small View must not be fixed. Be sure to use a fluid layout so that the view will be properly displayed on different Yahoo! sites. A vertical scroll bar appears when necessary.
- Unlike the Canvas View, advertisements and promotions cannot be served in a Small View.
- In the Small View, the code is restricted to HTML or YML You cannot specify JavaScript, PHP, or other languages for the Small View.


