ROPE examples.
(For further information see the source code of "rope_test.php"
and the static view of "rope_test.html" )
- Simple example
To show how ROPE resolves symboles using <rope:insert> tag
- "some[1]" symbol:
- "some[2]" symbol:
- Complex iteration example
To show ROPE array iteration, generating and resolving of ROPE local symbols
using <rope:foreach> and <rope:insert> tags
- Conditional example
Which shows the usage of <rope:if> tag:
- "some_1" symbol:
true (is defined) its value is:
false (not defined or its value is null)
- "some_2" symbol:
true (is defined) its value is:
false (not defined or its value is null)
- "some_3" symbol:
true (is defined) its value is:
false (not defined or its value is null)
- "some_4" symbol:
true (is defined) its value is:
false (not defined or its value is null)
- File include example
Which shows the usage of <rope:include> tag:
- "Runtime" example on defining macros, symbols and processing macros
Which shows the usage of <rope:set>, <rope:defmacro> and <rope:domacro> tags
and their multilevel referencing:
The "some" symbols in a foreach block:
=>
- At last a very complex example
Which presents amongst others the usage of ROPE intag attributes:
Suppose we want to list the records of a database got as results from an SQL query in the table shown in previous examples
that way that some of the rows can possess a checkbox and others cannot.
The IDs and the initial states (checked/unchecked) of the selectable rows are defined in database and also got from the SQL query.
(QUICK project :))
Let's work it out with the help of ROPE!
This example can be a good start point to solve any problem with ROPE.
Let think about a menu with dynamic deepness which can be generated recursively by a ROPE macro or about the momentary
state of the menupoints, etc.