Header

php Block

Actions Site Map

Actions
Actions
Action Tutorials
Shake!
php Actions
Writing Actions

Code Produced

The following HTML was generated in Freeway:

Take the following HTML:

<table border=0 cellspacing=0 cellpadding=0 width=208>

<tr valign=top>

<td height=8 colspan=4></td>

<td height=8></td>

</tr>

<tr valign=top>

<td height=61 rowspan=3></td>

<td height=61 rowspan=3><img src="Resources/actionicon600x60.jpeg" border=0 width=61 height=61 alt="ActionIcon600x600a"></td>

<td height=3 colspan=2></td>

<td height=3></td>

</tr>

<tr valign=top>

<td height=57></td>

<td height=57><p class="_lp">Nested items</p>

</td>

<td height=57></td>

</tr>

<tr valign=top>

<td height=1 colspan=2></td>

<td height=1></td>

</tr>

<tr class="_sp">

<td width=10 height=31><img src="Resources/_clear.gif" border=0 width=10 height=1 alt=""></td>

<td width=61 height=31><img src="Resources/_clear.gif" border=0 width=61 height=1 alt=""></td>

<td width=12 height=31><img src="Resources/_clear.gif" border=0 width=12 height=1 alt=""></td>

<td width=112 height=31><img src="Resources/_clear.gif" border=0 width=112 height=1 alt=""></td>

<td width=13 height=31><img src="Resources/_clear.gif" border=0 width=13 height=1 alt=""></td>

</tr>

</table>

When the PHP Block Action is Applied, you get this:

<?PHP

$fwCount = 0;

 

$fwCount +=1;

print <<<END

 

<table border=0 cellspacing=0 cellpadding=0 width=208>

<tr valign=top>

<td height=8 colspan=4></td>

<td height=8></td>

</tr>

<tr valign=top>

<td height=61 rowspan=3></td>

<td height=61 rowspan=3><img src="Resources/actionicon600x60.jpeg" border=0 width=61 height=61 alt="ActionIcon600x600a" id="ActionIcon600x600aPHP$fwCount"></td>

<td height=3 colspan=2></td>

<td height=3></td>

</tr>

<tr valign=top>

<td height=57></td>

<td height=57><p class="_lp">Nested items</p>

</td>

<td height=57></td>

</tr>

<tr valign=top>

<td height=1 colspan=2></td>

<td height=1></td>

</tr>

<tr class="_sp">

<td width=10 height=31><img src="Resources/_clear.gif" border=0 width=10 height=1 alt=""></td>

<td width=61 height=31><img src="Resources/_clear.gif" border=0 width=61 height=1 alt=""></td>

<td width=12 height=31><img src="Resources/_clear.gif" border=0 width=12 height=1 alt=""></td>

<td width=112 height=31><img src="Resources/_clear.gif" border=0 width=112 height=1 alt=""></td>

<td width=13 height=31><img src="Resources/_clear.gif" border=0 width=13 height=1 alt=""></td>

</tr>

</table>

END;

 

?>

The following things should be noted:

1 - a variable, $fwCount is created. This allows the PHP to loop through and rename images, image maps etc which makes rollovers and image maps to function correctly when duplicated by PHP. Do not use $fwCount for anything else.

2 - You should reset any array in the After block of the Action's code. This is because image maps may use dynamically created links, and you will want to pull the information out of the array in the correct order when the page is run on the server.

awards

Search the Knowledgebase
   

Cheerfully Made with Freeway 4 Pro
Valid HTML 4.01 Transitional Valid CSS!

Home | Products | Store | Support | Company | Media | Terms of Use | Privacy Policy | Site Map

Copyright ©2002 - 2008 Softpress Systems Limited. All rights reserved in all countries.

Freeway is a registered trademark of Softpress Systems Limited.
Other names may be trademarks or registered trademarks of their respective owners.

Site map | Contact us

Softpress freeway 4 pro and express freeway logo