Add The Title To The Html Template; Testing The Plug-In; Adding A Customized Tagset - Adobe 65007312 - Photoshop Lightroom Programmer's Manual

Mac
Hide thumbs Also See for 65007312 - Photoshop Lightroom:
Table of Contents

Advertisement

C
11: Web Gallery Plug-ins: A Tutorial Example
HAPTER

Add the title to the HTML template

The title will be shown on all pages, so it should be part of the boilerplate HTML used at the front of all
pages, as defined by the
3. Edit the
tag:
<h1 onclick="clickTarget( this, 'metadata.siteTitle.value' );"
Notice that the title text is found in the model variable, the same one bound to the text-input control
in the control panel. An event handler here allows edit-in-place in the browser window of the Web
Gallery page, in addition to the editing capability provided by UI control.
4. To make edit-in-place work, we need a JavaScript script to handle Live Update. Add the next statement
immediately following, identifying a script to be executed
<script type="text/javascript" src="$theRoot/resources/live_update.js"></script>
5. We need to make this script part of the plug-in. To do this, we need to both provide the script, and tell
the plug-in it's there.
In the manifest.lrweb page, add this command:
AddResources{
}
Create a copy of the file
resources
callbacks needed for Live Update.

Testing the plug-in

1. Save all of your changes and restart Lightroom.
2. Select some photos.
3. Go to the Web Gallery page and select the new gallery type.
4. Place the cursor over the "MySample" text that appears as the default title; you should be able to edit
it.
5. Look in the Site Info section of the control panel, and try editing the title text from there.

Adding a customized tagset

A tagset for a web gallery is an external file containing macro-like definitions that can be loaded by your
web pages; see
build up a complex string. Our tags will build up a complex string by combining random members of a list
of predefined elements with some set text and with the content of the tag when it is included in a page.
header.html
template file, adding the following heading immediately following the
header.html
id="metadata.siteTitle.value">$model.metadata.siteTitle.value</h1>
source="resources",
destination="resources",
live_update.js
subfolder of the plug-in. This is a sample implementation of the update functions and
"Web SDK tagsets" on page
template file.
, which is part of the Lightroom SDK, and place it in the
135. We will create a tagset for this gallery that allows us to
Adding a customized tagset 202
<body>

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop lightroom sdk 3.0

Table of Contents