Mercurial > p > roundup > code
comparison doc/customizing.txt @ 1371:56c5b4509378 maint-0.5
revert StringHTMLProperty to not hyperlink text by default (added doc too)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 13 Jan 2003 04:24:54 +0000 |
| parents | 83f33642d220 |
| children | 24460bef0efd |
comparison
equal
deleted
inserted
replaced
| 1368:434708fc4c29 | 1371:56c5b4509378 |
|---|---|
| 1 =================== | 1 =================== |
| 2 Customising Roundup | 2 Customising Roundup |
| 3 =================== | 3 =================== |
| 4 | 4 |
| 5 :Version: $Revision: 1.68 $ | 5 :Version: $Revision: 1.68.2.1 $ |
| 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:: |
| 1217 retrieved from the hyperdb for this property | 1217 retrieved from the hyperdb for this property |
| 1218 =============== ============================================================= | 1218 =============== ============================================================= |
| 1219 | 1219 |
| 1220 There are several methods available on these wrapper objects: | 1220 There are several methods available on these wrapper objects: |
| 1221 | 1221 |
| 1222 =========== ================================================================= | 1222 ========= ===================================================================== |
| 1223 Method Description | 1223 Method Description |
| 1224 =========== ================================================================= | 1224 ========= ===================================================================== |
| 1225 plain render a "plain" representation of the property | 1225 plain render a "plain" representation of the property. This method may |
| 1226 field render an appropriate form edit field for the property - for most | 1226 take two arguments: |
| 1227 types this is a text entry box, but for Booleans it's a tri-state | 1227 |
| 1228 yes/no/neither selection. | 1228 escape |
| 1229 stext only on String properties - render the value of the | 1229 If true, escape the text so it is HTML safe (default: no). The |
| 1230 property as StructuredText (requires the StructureText module | 1230 reason this defaults to off is that text is usually escaped |
| 1231 to be installed separately) | 1231 at a later stage by the TAL commands, unless the "structure" |
| 1232 multiline only on String properties - render a multiline form edit | 1232 option is used in the template. The following are equivalent:: |
| 1233 field for the property | 1233 |
| 1234 email only on String properties - render the value of the | 1234 <p tal:content="structure python:msg.content.plain(escape=1)" /> |
| 1235 property as an obscured email address | 1235 <p tal:content="python:msg.content.plain()" /> |
| 1236 confirm only on Password properties - render a second form edit field for | 1236 <p tal:content="msg/content/plain" /> |
| 1237 the property, used for confirmation that the user typed the | 1237 <p tal:content="msg/content" /> |
| 1238 password correctly. Generates a field with name "name:confirm". | 1238 |
| 1239 reldate only on Date properties - render the interval between the | 1239 hyperlink |
| 1240 date and now | 1240 If true, turn URLs, email addresses and hyperdb item designators |
| 1241 pretty only on Interval properties - render the interval in a | 1241 in the text into hyperlinks (default: no). Note that you'll need |
| 1242 pretty format (eg. "yesterday") | 1242 to use the "structure" TAL option if you want to use this:: |
| 1243 menu only on Link and Multilink properties - render a form select | 1243 |
| 1244 list for this property | 1244 <p tal:content="structure python:msg.content.plain(hyperlink=1)" /> |
| 1245 reverse only on Multilink properties - produce a list of the linked | 1245 |
| 1246 items in reverse order | 1246 Note also that the text is automatically HTML-escape before the |
| 1247 =========== ================================================================= | 1247 hyperlinking transformation. |
| 1248 | |
| 1249 field render an appropriate form edit field for the property - for most | |
| 1250 types this is a text entry box, but for Booleans it's a tri-state | |
| 1251 yes/no/neither selection. | |
| 1252 stext only on String properties - render the value of the | |
| 1253 property as StructuredText (requires the StructureText module | |
| 1254 to be installed separately) | |
| 1255 multiline only on String properties - render a multiline form edit | |
| 1256 field for the property | |
| 1257 email only on String properties - render the value of the | |
| 1258 property as an obscured email address | |
| 1259 confirm only on Password properties - render a second form edit field for | |
| 1260 the property, used for confirmation that the user typed the | |
| 1261 password correctly. Generates a field with name "name:confirm". | |
| 1262 reldate only on Date properties - render the interval between the | |
| 1263 date and now | |
| 1264 pretty only on Interval properties - render the interval in a | |
| 1265 pretty format (eg. "yesterday") | |
| 1266 menu only on Link and Multilink properties - render a form select | |
| 1267 list for this property | |
| 1268 reverse only on Multilink properties - produce a list of the linked | |
| 1269 items in reverse order | |
| 1270 ========= ===================================================================== | |
| 1248 | 1271 |
| 1249 The request variable | 1272 The request variable |
| 1250 ~~~~~~~~~~~~~~~~~~~~ | 1273 ~~~~~~~~~~~~~~~~~~~~ |
| 1251 | 1274 |
| 1252 Note: this is implemented by the roundup.cgi.templating.HTMLRequest class. | 1275 Note: this is implemented by the roundup.cgi.templating.HTMLRequest class. |
