<h1 class="underline">Recipes</h1>
<p>Browse through our gallery of fine dishes, in an attempt to help cut your calories and such.</p>

{if $smarty.request.viewRecipe gt 0}
<h2>Viewing: Example Recipe</h2>

{select_query assign="recipe"}
title, servings, description, ingredients, directions, calories, fat, carbs, protein, cholesterol, sodium, saturatedFat, fiber
FROM recipes
WHERE id = "{$smarty.request.viewRecipe|intval}"
ORDER BY title
{/select_query}
{* big preview layout *}
{/if}

{select_query assign="recipe"}
title, servings, description, ingredients, directions, calories, fat, carbs, protein, cholesterol, sodium, saturatedFat, fiber
FROM recipes
WHERE id = "{$smarty.request.viewRecipe|intval}"
ORDER BY title
{/select_query}

{assign var="intNewCol" value=$tips|@count|math:"round(x / 2) + 1"}

<table width="95%" cellpadding="5" align="center">
<tr><td valign="top">
{foreach name="tips" from=$tips item="current"}
{if $smarty.foreach.tips.iteration eq $intNewCol}</td><td valign="top">{/if}
<div class="notepaperBG" style="padding:17px;">
	{$current.testimonial}<br />
</div><br />
{/foreach}
</td></tr>
</table>