in reply to Re: Too difficult for me...
in thread Too difficult for me...
In most cases the body.aXML just contains a use tag which calls up a template, which then calls main.aXML but for simplicity I didn't bother putting that detail into the example. The example gives an output of comments from the SQL database, the system itself takes care of connecting to the database etc, leaving the designer free to simply plug together the existing modules using the simple syntax... this massively streamlines the development of new systems, as the modules are reusable and can be stacked together in multiple different abstract ways. for another example, here is a version of main.aXML which takes a query data argument telling it how many results to show;listing of an example body.aXML <html> <head> <title><conf>site_title</conf></title> </head> <body> <use>main</use> </body> </html> listing of main.aXML <div id="comments"> <table> (sql mode="mask") <query> SELECT * FROM comments; </query> <mask> <tr> <td><d>comment</d></td> <td>[link action="showuser" userid="<d>userid</d>" ]<d>username</d>[/link]</td> <td><d>timestamp</d></td> </tr> </mask> (/sql) </table> </div>
Where (qd)limit(/qd) would refer to a value passed in the query data key => value hash, under the key named "limit".<div id="comments"> <table> (sql mode="mask") <query> SELECT * FROM comments LIMIT (qd)limit(/qd); </query> <mask> <tr> <td><d>comment</d></td> <td>[link action="showuser" userid="<d>userid</d>" ]<d>username</d>[/link]</td> <td><d>timestamp</d></td> </tr> </mask> (/sql) </table> </div>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Too difficult for me...
by Corion (Patriarch) on Jun 19, 2011 at 09:30 UTC | |
by simonodell (Acolyte) on Jun 19, 2011 at 12:05 UTC | |
by Corion (Patriarch) on Jun 19, 2011 at 12:16 UTC | |
by simonodell (Acolyte) on Jun 19, 2011 at 12:39 UTC | |
by Corion (Patriarch) on Jun 19, 2011 at 12:55 UTC | |
by simonodell (Acolyte) on Jun 19, 2011 at 12:20 UTC | |
|
Re^3: Too difficult for me...
by simonodell (Acolyte) on Jun 19, 2011 at 07:52 UTC | |
by simonodell (Acolyte) on Jun 19, 2011 at 07:57 UTC | |
by Corion (Patriarch) on Jun 19, 2011 at 09:41 UTC |