DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Display In 2-Column Table

  • submit to reddit
        The below can be applied to MT, EE, etc, and will display the content in a 2 column table. The EE tags below are just an example, it will work equally well if you replace it with MT, Wordpress, etc, tags.

<? $set_table="0"; ?>

<table cellpadding="5" border="0">
{exp:gallery:categories gallery="{gallery_name}"}
$set_table = $set_table +1;
if ($set_table == "1") {echo"<tr>";} ?>

Insert other tags here.

<? if ($set_table == "2") {echo"</tr>";  $set_table="0";} ?>