comparison doc/customizing.txt @ 1773:5f15fb95180c

various cosmetic fixes
author Richard Jones <richard@users.sourceforge.net>
date Thu, 28 Aug 2003 05:53:40 +0000
parents 2dd6b4c825e9
children fbe08359511a
comparison
equal deleted inserted replaced
1771:332fe2b77e1c 1773:5f15fb95180c
1 =================== 1 ===================
2 Customising Roundup 2 Customising Roundup
3 =================== 3 ===================
4 4
5 :Version: $Revision: 1.93 $ 5 :Version: $Revision: 1.94 $
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::
1471 value retrieved from the hyperdb for this property 1471 value retrieved from the hyperdb for this property
1472 =============== ======================================================== 1472 =============== ========================================================
1473 1473
1474 There are several methods available on these wrapper objects: 1474 There are several methods available on these wrapper objects:
1475 1475
1476 ========= ================================================================ 1476 =========== ================================================================
1477 Method Description 1477 Method Description
1478 ========= ================================================================ 1478 =========== ================================================================
1479 plain render a "plain" representation of the property. This method 1479 plain render a "plain" representation of the property. This method
1480 may take two arguments: 1480 may take two arguments:
1481 1481
1482 escape 1482 escape
1483 If true, escape the text so it is HTML safe (default: no). The 1483 If true, escape the text so it is HTML safe (default: no). The
1484 reason this defaults to off is that text is usually escaped 1484 reason this defaults to off is that text is usually escaped
1485 at a later stage by the TAL commands, unless the "structure" 1485 at a later stage by the TAL commands, unless the "structure"
1486 option is used in the template. The following ``tal:content`` 1486 option is used in the template. The following ``tal:content``
1487 expressions are all equivalent:: 1487 expressions are all equivalent::
1488 1488
1489 "structure python:msg.content.plain(escape=1)" 1489 "structure python:msg.content.plain(escape=1)"
1490 "python:msg.content.plain()" 1490 "python:msg.content.plain()"
1491 "msg/content/plain" 1491 "msg/content/plain"
1492 "msg/content" 1492 "msg/content"
1493 1493
1494 Usually you'll only want to use the escape option in a 1494 Usually you'll only want to use the escape option in a
1495 complex expression. 1495 complex expression.
1496 1496
1497 hyperlink 1497 hyperlink
1498 If true, turn URLs, email addresses and hyperdb item 1498 If true, turn URLs, email addresses and hyperdb item
1499 designators in the text into hyperlinks (default: no). Note 1499 designators in the text into hyperlinks (default: no). Note
1500 that you'll need to use the "structure" TAL option if you 1500 that you'll need to use the "structure" TAL option if you
1501 want to use this ``tal:content`` expression:: 1501 want to use this ``tal:content`` expression::
1502 1502
1503 "structure python:msg.content.plain(hyperlink=1)" 1503 "structure python:msg.content.plain(hyperlink=1)"
1504 1504
1505 Note also that the text is automatically HTML-escaped before 1505 Note also that the text is automatically HTML-escaped before
1506 the hyperlinking transformation. 1506 the hyperlinking transformation.
1507 1507 hyperlinked The same as msg.content.plain(hyperlink=1), but nicer::
1508 field render an appropriate form edit field for the property - for 1508
1509 most types this is a text entry box, but for Booleans it's a 1509 "structure msg/content/hyperlinked"
1510 tri-state yes/no/neither selection. 1510
1511 stext only on String properties - render the value of the property 1511 field render an appropriate form edit field for the property - for
1512 as StructuredText (requires the StructureText module to be 1512 most types this is a text entry box, but for Booleans it's a
1513 installed separately) 1513 tri-state yes/no/neither selection.
1514 multiline only on String properties - render a multiline form edit 1514 stext only on String properties - render the value of the property
1515 field for the property 1515 as StructuredText (requires the StructureText module to be
1516 email only on String properties - render the value of the property 1516 installed separately)
1517 as an obscured email address 1517 multiline only on String properties - render a multiline form edit
1518 confirm only on Password properties - render a second form edit field 1518 field for the property
1519 for the property, used for confirmation that the user typed 1519 email only on String properties - render the value of the property
1520 the password correctly. Generates a field with name 1520 as an obscured email address
1521 "name:confirm". 1521 confirm only on Password properties - render a second form edit field
1522 now only on Date properties - return the current date as a new 1522 for the property, used for confirmation that the user typed
1523 property 1523 the password correctly. Generates a field with name
1524 reldate only on Date properties - render the interval between the date 1524 "name:confirm".
1525 and now 1525 now only on Date properties - return the current date as a new
1526 local only on Date properties - return this date as a new property 1526 property
1527 with some timezone offset 1527 reldate only on Date properties - render the interval between the date
1528 pretty only on Interval properties - render the interval in a pretty 1528 and now
1529 format (eg. "yesterday") 1529 local only on Date properties - return this date as a new property
1530 menu only on Link and Multilink properties - render a form select 1530 with some timezone offset
1531 list for this property 1531 pretty only on Interval properties - render the interval in a pretty
1532 reverse only on Multilink properties - produce a list of the linked 1532 format (eg. "yesterday")
1533 items in reverse order 1533 menu only on Link and Multilink properties - render a form select
1534 ========= ================================================================ 1534 list for this property
1535 reverse only on Multilink properties - produce a list of the linked
1536 items in reverse order
1537 =========== ================================================================
1535 1538
1536 1539
1537 The request variable 1540 The request variable
1538 ~~~~~~~~~~~~~~~~~~~~ 1541 ~~~~~~~~~~~~~~~~~~~~
1539 1542

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