Hi im making a directory using PHPLD2 and want to make it so that on the front page, the 3 newest feartured link's will be shown. The problem is not to get the 3 newest to be shown on the front page. It is that i want them in a table with 3 rows. along with an image next to them.... the image is not a problem. How do i make it so that i get one in one row. The next in the next and so on. It is freaking me out... this is the code for the 3 to be shown on the front page in main.tpl: This is the code in index.php :
Hi, Try this: {if $category.ID eq 0 and not $p and not $qu} <table> {foreach from=$feat3 item=link name=links} <tr> <td><a href="{$link.URL}">{$link.TITLE}</a> <td>{$link.DESCRIPTION}<br>{/foreach}{/if}</td></tr> {/foreach} </table> {/if} Personally I hate using tables. I am working on rebuilding my site's template without using tables. I messed up my site too many times trying to modify or add things to this template. You can add the image in the above code between the <tr> and the first <td> like this: <td><img src="imagepath.jpg"></td> Thomas
You can use <span></span> just as well instead of tables. If you don't know much about css you can always just write the spacing inline. <span style="width:50px">{your icon}</span> <span style="width:100px">{your link code}</span> <br>