If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > php and Fast Template

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-09-03, 09:51
jclaudio jclaudio is offline
Registered User
 
Join Date: Sep 2003
Posts: 5
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...
Reply With Quote
  #2 (permalink)  
Old 12-18-03, 20:25
piet piet is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On