alfonso
Posts: 121
|
Posted: 06/05/2008, 10:46 PM |
|
I want to insert html into a field to show in html a table. For example, if my field called foto2 has a value "image1.jpg" I want to replace that value with:
<td width="72"><img src="fotos/elementos/tn{foto2}" alt="{te_id}. {co_id}: {nombre}" name=id="elementosfoto2_{elementos:rowNumber}" width="70" border="1" id="elementosfoto2_{elementos:rowNumber}" class="borde" /></td>
where {te_id} {co_id} and {nombre} are other fileds into my table
Thanks
|
|
|
alfonso
Posts: 121
|
Posted: 06/05/2008, 11:14 PM |
|
In CC2 asn ASP I worte, for example:
if fldfoto<>"" then
fldfoto="<table width='126' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td><img src=fotos/noticias/" & fldfoto &" border=1 width='130'></td><td rowspan='2'><img src='images/casas/sombra2.gif' width='6' height='88' /></td></tr><tr><td><div align='right'><img src='images/casas/sombra1.gif' width='120' height='8' /></div></td></tr><tr><td><div align='right'><span class='Estilo33'>"&fldcomentariofoto&"</span></div></td><td></td></tr></table>"
end if
How can I do the same with CC4 and PHP?
|
|
|
alfonso
Posts: 121
|
Posted: 06/05/2008, 11:18 PM |
|
I try to change image fiel with label field. Later change Text to Html into Content.
Code in before show:
$Component->SetValue("<td><img id='elementosfoto1_{elementos:rowNumber}' alt='Prueba' src='fotos/elementos/tn{foto1}' /> </td>");
So try to appears an image but with name {foto1}. I get error here.
|
|
|
alfonso
Posts: 121
|
Posted: 06/05/2008, 11:31 PM |
|
More options:
$Component->SetValue("<td><img id='elementosfoto1_{elementos:rowNumber}' alt='Prueba' src='fotos/elementos/tn".$popo."' /> </td>");
Now my problem is how to put into $popo the value of any field of the table
|
|
|