From: <zo...@us...> - 2005-04-14 21:02:18
|
Update of /cvsroot/plone-docs/PloneBook/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7136 Modified Files: ch5.rst Log Message: Fix the Members expression Index: ch5.rst =================================================================== RCS file: /cvsroot/plone-docs/PloneBook/en/ch5.rst,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ch5.rst 5 Jan 2005 11:00:31 -0000 1.4 --- ch5.rst 14 Apr 2005 21:02:07 -0000 1.5 *************** *** 202,206 **** ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ! I've seen newcomers mixing up Python and strings a few times. All the expressions are different. In other words, you can't place path-like expressions inside a Python expression. For example, the expression *python: here/Members + "/danae"* doesn't make sense. The entire expression is interpreted as Python, so Plone will try to divide *here* by *Members*, and you'll get errors. This is an ideal situation to use a string expression (which lets you do variable substitution), so the variable contain a path expression. So, you could use *string: ${here/Members}/danae*. Using the Zope Page Templates System --- 202,206 ---- ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ! I've seen newcomers mixing up Python and strings a few times. All the expressions are different. In other words, you can't place path-like expressions inside a Python expression. For example, the expression *python: here/Members/absolute_url + "/danae"* doesn't make sense. The entire expression is interpreted as Python, so Plone will try to divide one thing by another, and you'll get errors. This is an ideal situation to use a string expression (which lets you do variable substitution), so the variable contain a path expression. So, you could use *string: ${here/Members/absolute_url}/danae*. Using the Zope Page Templates System |