Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    5

    Unanswered: php and Fast Template

    Hi, I'm working on creating an intranet, and HTML pages in order to consult a postgreSQL database. I naturally chosed php, and I decided to use the Fast Template class to separate the php code and the HTML.

    Since It's possible to define Dynamic Blocks, I wonder if It's possible to include in the html a dynamic block into another one

    I mean doing something like that in the "page.html":

    <body>
    <!-- BEGIN DYNAMIC BLOCK : BLOCK_MENUS -->
    <table border="1">
    <tr>
    <td>{MENU TITLE}</td>
    <td>title_column1</td>
    <td>title_column2 </td>
    <td>title_column3</td>
    </tr>
    <!-- BEGIN DYNAMIC BLOCK : BLOCK_ROWS -->
    <tr>
    <td>{FIELD1}</td>
    <td>{FIELD2}</td>
    <td>{FIELD3}</td>
    <td>{FIELD4}</td>
    </tr>
    <!-- END DYNAMIC BLOCK : BLOCK_ROWS -->
    </table>
    <!-- END DYNAMIC BLOCK : BLOCK_MENUS -->
    </body>

    having several rows in several menus.

    If anybody familiar with the templates could answer me...

  2. #2
    Join Date
    Feb 2002
    Posts
    20
    I use a templating system that does allow that. I am sure that Fast Template does as well. However, in the template system that I use it would look more like this:

    <body>
    <!-- BEGIN DYNAMIC BLOCK : BLOCK_MENUS -->
    <table border="1">
    <tr>
    <td>{BLOCK_MENUS.MENU TITLE}</td>
    <td>title_column1</td>
    <td>title_column2 </td>
    <td>title_column3</td>
    </tr>
    <!-- BEGIN DYNAMIC BLOCK : BLOCK_ROWS -->
    <tr>
    <td>{BLOCK_MENUS.BLOCK_ROWS.FIELD1}</td>
    <td>{BLOCK_MENUS.BLOCK_ROWS.FIELD2}</td>
    <td>{BLOCK_MENUS.BLOCK_ROWS.FIELD3}</td>
    <td>{BLOCK_MENUS.BLOCK_ROWS.FIELD4}</td>
    </tr>
    <!-- END DYNAMIC BLOCK : BLOCK_ROWS -->
    </table>
    <!-- END DYNAMIC BLOCK : BLOCK_MENUS -->
    </body>

    Hopefully your templating engine will need this type of layout as well. I hope I have helped you and not messed you up.

    Let me know if this helps.

    Piet

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •