Adobe 65007312 Programming Guide - Page 115

Writing a Web-engine Plug-in, Folder contents

Page 115 highlights

6 Writing a Web-engine Plug-in This chapter describes the web-engine plug-in mechanism in the Lightroom SDK. This mechanism allows you to define new HTML web engines for the Web module. A web engine controls how a photo gallery is generated. Web-engine plug-ins use a different architecture from standard plug-ins, and are not managed by the Plug-in Manager dialog. All available web engines appear in the Engine panel at the upper right of the Web module of Lightroom, including those predefined by Lightroom and any defined by plug-ins. Your plug-in can also customize the control panels in the Web module, so that the controls map to user-customizable features of your own web engine. Creating a web-engine plug-in A web-engine plug-in consists of: X A manifest file named manifest.lrweb, which maps LuaPage source files to the HTML output files that make up a photo gallery. This file uses a special command set; see "Web SDK manifest API" on page 127. X An information file named galleryInfo.lrweb, which defines the data model and customized UI for your gallery type. See "Defining the data model" on page 116. X One or more web-page templates, in the form of LuaPages; that is, HTML pages with embedded Lua code that is evaluated for display in the preview browser, or on publication, to generate dynamic content. See "LuaPage syntax" on page 133. X Additional resources and supporting files, such as images, style sheets, string dictionaries for localization, and code files that define special behaviors. Collect these files into a single folder, which you must place in the following directory according to your operating system: IN MAC OS: userhome/Library/Application Support/Adobe/Lightroom/Web Galleries/ IN WINDOWS: LightroomRoot\shared\webengines The name of the plug-in folder must end with .lrwebengine; for example, myWebPlugin.lrwebengine. Folder contents Here are the contents of a sample web-engine folder named default_html.lrwebengine: Root default_html.lrwebengine/ Template information manifest.lrweb galleryInfo.lrweb 115

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204

115
6
Writing a Web-engine Plug-in
This chapter describes the web-engine plug-in mechanism in the Lightroom SDK. This mechanism allows
you to define new HTML web engines for the Web module. A web engine controls how a photo gallery is
generated.
Web-engine plug-ins use a different architecture from standard plug-ins, and are not managed by the
Plug-in Manager dialog. All available web engines appear in the Engine panel at the upper right of the
Web module of Lightroom, including those predefined by Lightroom and any defined by plug-ins.
Your plug-in can also customize the control panels in the Web module, so that the controls map to
user-customizable features of your own web engine.
Creating a web-engine plug-in
A web-engine plug-in consists of:
X
A
manifest
file named
manifest.lrweb
, which maps LuaPage source files to the HTML output files
that make up a photo gallery. This file uses a special command set; see
“Web SDK manifest API” on
page 127
.
X
An information file named
galleryInfo.lrweb
, which defines the
data model
and customized UI for
your gallery type. See
“Defining the data model” on page 116
.
X
One or more
web-page templates
, in the form of LuaPages; that is, HTML pages with embedded Lua
code that is evaluated for display in the preview browser, or on publication, to generate dynamic
content. See
“LuaPage syntax” on page 133
.
X
Additional resources and supporting files, such as images, style sheets, string dictionaries for
localization, and code files that define special behaviors.
Collect these files into a single folder, which you must place in the following directory according to your
operating system:
I
N
M
AC
OS:
userhome
/Library/Application Support/Adobe/Lightroom/Web Galleries/
I
N
W
INDOWS
:
LightroomRoot
\shared\webengines
The name of the plug-in folder must end with
.lrwebengine
; for example,
myWebPlugin.lrwebengine
.
Folder contents
Here are the contents of a sample web-engine folder named
default_html.lrwebengine
:
Root
default_html.lrwebengine/
Template
information
manifest.lrweb
galleryInfo.lrweb