Welcome, guest Sign Out

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.

A Small view has two states:

  • Default: To define the code for the default state, in the Application Editor, 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: To personalize the Small view, an application calls the setSmallView method of the YSP PHP SDK. 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 YSP PHP SDK, for example, in the Canvas view and back-end processes.

Small views have the following constraints:

  • The size of a Small view depends on its host Web page, but typically the size is 300 px wide by 250 px high (with fluid height).
  • 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.
Example Small View

Figure 2.2. Example Small View


Table of Contents

Copyright © 2009 Yahoo! Inc. All rights reserved. Copyright | Privacy Policy

Help us continue to improve the Yahoo! Developer Network: Send Your Suggestions