comparison doc/customizing.txt @ 1374:8e4c3e8de96f

fix StringHTMLProperty hyperlinking
author Richard Jones <richard@users.sourceforge.net>
date Mon, 13 Jan 2003 23:30:44 +0000
parents 4884fb0860f9
children ca7dfc8bce15
comparison
equal deleted inserted replaced
1373:229581bd1985 1374:8e4c3e8de96f
1 =================== 1 ===================
2 Customising Roundup 2 Customising Roundup
3 =================== 3 ===================
4 4
5 :Version: $Revision: 1.70 $ 5 :Version: $Revision: 1.71 $
6 6
7 .. This document borrows from the ZopeBook section on ZPT. The original is at: 7 .. This document borrows from the ZopeBook section on ZPT. The original is at:
8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx 8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
9 9
10 .. contents:: 10 .. contents::
1245 retrieved from the hyperdb for this property 1245 retrieved from the hyperdb for this property
1246 =============== ============================================================= 1246 =============== =============================================================
1247 1247
1248 There are several methods available on these wrapper objects: 1248 There are several methods available on these wrapper objects:
1249 1249
1250 =========== ================================================================= 1250 ========= =====================================================================
1251 Method Description 1251 Method Description
1252 =========== ================================================================= 1252 ========= =====================================================================
1253 plain render a "plain" representation of the property 1253 plain render a "plain" representation of the property. This method may
1254 field render an appropriate form edit field for the property - for most 1254 take two arguments:
1255 types this is a text entry box, but for Booleans it's a tri-state 1255
1256 yes/no/neither selection. 1256 escape
1257 stext only on String properties - render the value of the 1257 If true, escape the text so it is HTML safe (default: no). The
1258 property as StructuredText (requires the StructureText module 1258 reason this defaults to off is that text is usually escaped
1259 to be installed separately) 1259 at a later stage by the TAL commands, unless the "structure"
1260 multiline only on String properties - render a multiline form edit 1260 option is used in the template. The following are all equivalent::
1261 field for the property 1261
1262 email only on String properties - render the value of the 1262 <p tal:content="structure python:msg.content.plain(escape=1)" />
1263 property as an obscured email address 1263 <p tal:content="python:msg.content.plain()" />
1264 confirm only on Password properties - render a second form edit field for 1264 <p tal:content="msg/content/plain" />
1265 the property, used for confirmation that the user typed the 1265 <p tal:content="msg/content" />
1266 password correctly. Generates a field with name "name:confirm". 1266
1267 reldate only on Date properties - render the interval between the 1267 Usually you'll only want to use the escape option in a complex
1268 date and now 1268 expression.
1269 pretty only on Interval properties - render the interval in a 1269
1270 pretty format (eg. "yesterday") 1270 hyperlink
1271 menu only on Link and Multilink properties - render a form select 1271 If true, turn URLs, email addresses and hyperdb item designators
1272 list for this property 1272 in the text into hyperlinks (default: no). Note that you'll need
1273 reverse only on Multilink properties - produce a list of the linked 1273 to use the "structure" TAL option if you want to use this::
1274 items in reverse order 1274
1275 =========== ================================================================= 1275 <p tal:content="structure python:msg.content.plain(hyperlink=1)" />
1276
1277 Note also that the text is automatically HTML-escape before the
1278 hyperlinking transformation.
1279
1280 field render an appropriate form edit field for the property - for most
1281 types this is a text entry box, but for Booleans it's a tri-state
1282 yes/no/neither selection.
1283 stext only on String properties - render the value of the
1284 property as StructuredText (requires the StructureText module
1285 to be installed separately)
1286 multiline only on String properties - render a multiline form edit
1287 field for the property
1288 email only on String properties - render the value of the
1289 property as an obscured email address
1290 confirm only on Password properties - render a second form edit field for
1291 the property, used for confirmation that the user typed the
1292 password correctly. Generates a field with name "name:confirm".
1293 reldate only on Date properties - render the interval between the
1294 date and now
1295 pretty only on Interval properties - render the interval in a
1296 pretty format (eg. "yesterday")
1297 menu only on Link and Multilink properties - render a form select
1298 list for this property
1299 reverse only on Multilink properties - produce a list of the linked
1300 items in reverse order
1301 ========= =====================================================================
1276 1302
1277 The request variable 1303 The request variable
1278 ~~~~~~~~~~~~~~~~~~~~ 1304 ~~~~~~~~~~~~~~~~~~~~
1279 1305
1280 Note: this is implemented by the roundup.cgi.templating.HTMLRequest class. 1306 Note: this is implemented by the roundup.cgi.templating.HTMLRequest class.

Roundup Issue Tracker: http://roundup-tracker.org/