Adobe
Products

Top destinations

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • SiteCatalyst
  • Students
  • Elements family

Adobe Creative Cloud

  • What is Adobe Creative Cloud?
  • Design
  • Web
  • Photography
  • Video
  • Students
  • Teams
  • Enterprise
  • Educational institutions

Design and photography

  • Photoshop
  • Illustrator
  • InDesign
  • Adobe Muse
  • Lightroom

Video

  • Adobe Premiere
  • After Effects

Web development and HTML5

  • Edge Tools & Services [opens in a new window]
  • Dreamweaver
  • Gaming [opens in a new window]

Adobe Marketing Cloud

  • What is Adobe Marketing Cloud?
  • Digital analytics
  • Social marketing
  • Web experience management
  • Testing and targeting
  • Media optimization

Analytics

  • SiteCatalyst
  • Adobe Discover
  • Insight

Social

  • Adobe Social

Experience Manager

  • CQ
  • Scene7

Target

  • Test&Target
  • Recommendations
  • Search&Promote

Media Optimizer

  • AdLens
  • AudienceManager
  • AudienceResearch

Document services

  • Acrobat
  • EchoSign [opens in a new window]
  • FormsCentral [opens in a new window]
  • SendNow [opens in a new window]
  • Acrobat.com [opens in a new window]

Publishing

  • Digital Publishing Suite

  • See all products
Business solutions

By business need

  • Digital analytics
  • Digital publishing
  • Document management
  • Media optimization
  • Social marketing
  • Testing and targeting
  • Video editing and serving
  • Web development [opens in a new window]
  • Web experience management
  • See all business needs

By industry

  • Broadcast
  • Education
  • Financial services
  • Government
  • Publishing
  • Retail
  • See all industries
Support & Learning

I need help

  • Products
  • Adobe Creative Cloud
  • Adobe Marketing Cloud
  • Forums [opens in a new window]

I want to learn

  • Training and tutorials
  • Certification [opens in a new window]
  • Adobe Developer Connection
  • Adobe Design Center
  • Adobe TV [opens in a new window]
  • Adobe Marketing Center
  • Adobe Labs [opens in a new window]
Download
  • Product trials
  • Adobe Flash Player
  • Adobe Reader
  • Adobe AIR
  • See all downloads
Company
  • Careers at Adobe
  • Investor Relations
  • Newsroom
  • Privacy
  • Corporate Social Responsibility
  • Customer Showcase
  • Contact us
  • More company info
Buy
  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers
  • Adobe Marketing Cloud sales [opens in a new window]
Search
 
Info Sign in
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Welcome,
My Adobe
My orders
My information
My preferences
My products and services
Sign out
My cart
Privacy My Adobe
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out Privacy My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Promotions
Estimated shipping
Tax
Calculated at checkout
Total
Review and Checkout
Adobe Developer Connection / Digital publishing /

Creating an HTML implementation of the DPS default library

by Derek Lu

Derek Lu
  • Adobe

Content

  • Template Overview
  • Using the template
  • Development considerations
  • Modifying the templates for your Digital Publishing Suite projects
  • Where to go from here
  • Change log

Modified

11 February 2013

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
Digital Publishing Suite, En...InDesign
Was this helpful?
Yes   No

By clicking Submit, you accept the Adobe Terms of Use.

 
Thanks for your feedback.
Prerequisite knowledge
Experience working with the Adobe Digital Publishing Suite is required. This article also assumes you have published public folios. To make modifications to the files, experience with HTML, CSS and JavaScript is recommended.

User level: Intermediate

Original publication date: 11/05/2012

Modified: 02/11/2013 (Change log)

Required products
  • InDesign (Download trial)
  • Digital Publishing Suite, Enterprise Edition

Other required products

  • Mac OS X - Used to view the template on the desktop with Safari.

Documentation
Library and Store API v2

Library and Store API v2 [zip file for offline viewing]

Sample files
default_library.zip
By downloading software from the Adobe Web site you agree to the terms of our license agreement. Please read it before downloading.
(File last updated on 02/11/2013)

In this article you will learn how to modify a sample template to replace the default library. The sample files in this article contain an HTML implementation of the default library that is included with the viewer. This template enables you to replace the native implementation with an HTML implementation. Using this template, you can customize the library using HTML, JavaScript, and CSS to fit your needs. The template uses APIs that allow you to duplicate e-commerce functionality found in the default library and customize it to fit your project.

Template Overview

Begin by downloading the sample files that are provided at the beginning of this article. The sample contains the HTML implementation of the default library. The figures below show the various views of the library.

Figure 1. Grid view of folios.
Figure 1. Grid view of folios.
Figure 2. The one up view of folios.
Figure 2. The one up view of folios.
Figure 3. The sign in dialog box.
Figure 3. The sign in dialog box.

Using the template

To use the provided template you must have folios published as public. The template uses the new library and store APIs to display folio data and images. All other images are packaged with your viewer.

Download and decompress the sample files folder to see the contents. Currently, the App Builder does not allow nested folders in HTMLResources. Because of this limitation, the template does not organize the files into folders.

Development considerations

During development, Adobe recommends that you first build and test your content on the desktop using Safari. This will allow you to adjust the user interface (UI) without having to generate a new viewer to see each change. When testing on your desktop, the API file is not available, so the viewer loads the data from the Adobe fulfillment XML feed.

While testing on the desktop, ensure that you remove the include for AdobeLibraryAPI.js in the index.html file—otherwise you will be unable to view the files in the desktop browser. When testing on the desktop, if nothing displays, open the debugger to check whether there are file paths that cannot be resolved. To use the debugger, use the following steps.

  1. If you do have the debugger on Safari open, select the Develop menu option by going to Safari > Preferences > Advanced. Select the Show Develop menu in menu bar option. The Develop menu will display.
  2. From the Develop menu, select Develop > Start Debugging JavaScript.
  3. Click Console to see if there are any errors. (On Safari 6, select Develop > Show Error Console.)
  4. Confirm that the template is running as expected on the desktop.
  5. Add the AdobeLibraryAPI.js include into to the page once again, and test the template on your device.

The following list contains descriptions of the key files in the template:

  • HTMLResources.zip – The file that is uploaded to App Builder. It is included as an example. This file can be uploaded to App Builder as-is for testing purposes.
  • assets/AdobeLibraryAPI.js – The file that contains the library and store APIs.
  • assets/backbone-min.js – An open-source application framework.
  • assets/index.html — The HTML file used to display the custom slot.
  • assets/jquery-1.7.2.min.js — The jQuery library.
  • assets/library.css – The styles for the template.
  • assets/main.js — The main JavaScript file that starts the application.
  • assets/underscore-min.js — JavaScript library used by Backbone.
  • assets/.png – The images for the template.
  • assets/.js – The JavaScript files for the template.

Note: You must include files in the assets directory in the custom slot ZIP file that you upload to App Builder.

Modifying the templates for your Digital Publishing Suite projects

To use of this template with your own content, simply complete the following steps:

  1. Modify assets/Config.js.
  2. Change the images.
  3. Upload files to App Builder.

The following sections describe each of these steps in more detail.

Modifying Config.js.

To modify assets/Config.js, use the following steps.

  1. If your viewer is not an entitlement viewer, set IS_ENTITLEMENT_VIEWER to false. If you are creating an entitlement viewer, you will also need to add your own code to AppView.js (line 110) and LoginDialog.js for the “Forgot password?” and “Sign In” links.
  2. Change FULFILLMENT_URL if you would like to test your account on the desktop. Since the API file is not available on the desktop, you can use this XML feed to display the folios. Modify FULFILLMENT_URL to match the accountId parameter with your accountId. If you need help finding your accountId, see the section titled “Connecting to fulfillment” in the article, Build a custom storefront. Once you have located your accountId, modify the value after http://edge.adobe-dcfs.com/ddp/issueServer/issues?accountId=[your value].
  3. If you would like to display the one up view rather than the grid as the default view, set IS_ONE_UP_VIEW_DEFAULT to true.
  4. If you do not want folios to automatically open when enough have been downloaded, set IS_AUTO_OPEN_DOWNLOADED_FOLIO to false.

Changing the images

If your viewer uses entitlement, the image used on the right side of the banner is banner_right.png. If your viewer uses subscriptions, the subscription tile images are subscription_tile_landscape.png and subscription_tile_portrait.png. To create new banners you will need to use an image editting tool such as Fireworks or Photoshop.

Uploading files to App Builder

Use the following steps to upload your files to the App Builder.

  1. Create an archive that contains the files from the assets directory. When creating the archive, ensure that you archive the files at the file level rather than at the directory level of the assets directory.
  2. Open the App Builder and navigate to the Navigation Toolbar section. For more information on the App Builder, watch the App Builder tutorial video.
  3. In the Navigation Toolbar section, select the option to Use Custom Viewer Library.
  4. In the Library HTML Resources ZIP field, navigate to your ZIP file to add it to your viewer.
  5. Select an orientation if you would like to lock the orientation to portrait or landscape.
  6. Select the Hide Title Bar option if you do not want to display the title bar. The label in the title bar uses the value defined in the HTML title tag in index.html.
  7. Select the Auto Launch option if you would like the custom slot to be the first slot displayed.
Figure 4. The Navigation Toolbar section of the App Builder  for the library.
Figure 4. The Navigation Toolbar section of the App Builder for the library.
  1. When your IPA has finished building, install the viewer on your device and begin testing.

Where to go from here

In this article you learned how to modify a sample template to replace the default library. If you would like more information on the JavaScript libraries used, check out the  documentation for Backbone, jQuery, and Underscore. See additional articles and videos available for Digital Publishing Suite on the Adobe Developer Connection.
I have written the following articles explaining how to use the library/store API:

  • Implementing the iPhone library/store template using new DPS APIs
  • Implementing separate library and store functionality using custom slot templates with new DPS APIs
  • Working with the combined library/store custom slot template using new DPS APIs

Change log

11/09/2012

  • API updates.

Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License+Adobe Commercial Rights

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

Products

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • Digital Publishing Suite
  • Elements family
  • SiteCatalyst
  • For education

Download

  • Product trials
  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR

Support & Learning

  • Product help
  • Forums

Buy

  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2013 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

Ad Choices

Reviewed by TRUSTe: site privacy statement