PHP code in menu item template
-
Hi
I need insert PHP code into menu item template…
my code:
<div style=”margin: 5px 20px 5px 0px ; width: 450px!important; height: auto!important; border-bottom: #c6c6c6 1px dotted;” class=”fl-menu-item” id=”fl-menu-item-[menu_item_id]-[menu_item_instance]”>
<h4>[menu_item_title]
<div class=”fl-menu-item-meta”>
[menu_item_tags]
<img src=”[menu_item_tag_icon_url]” alt=”[menu_item_tag_description]” />
[/menu_item_tags]
<span class=”fl-menu-item-price”>[menu_item_price]</span>
<span class=”fl-currency-sign”>[currency_sign]</span>
</div></h4>
<div class=”fl-excerpt”>
[menu_item_thumbnail]
[menu_item_excerpt]
<div><?php
$energia=[menu_item_energetic];
$weglowodany=[menu_item_weglowodany];
$bialko=[menu_item_bialko];
$tluszcze=[menu_item_tluszcze];if(isset($energia, $weglowodany, $bialko, $tluszcze)){
echo ‘<table style=”position: relative;top: 5px;margin-bottom:10px ;border: 1px solid #ccc; ” border=”1″ width=”450px” cellspacing=”0″ cellpadding=”0″>’;
echo ‘<tr>’;
echo ‘<td class=”fl-menu-item-tabs” width=”25%” style=”background: green;text-align: center”>Energia</td>’;
echo ‘<td class=”fl-menu-item-tabs” width=”25%” style=”background: green;text-align: center”>Bia?ko</td>’;
echo ‘<td class=”fl-menu-item-tabs” width=”25%” style=”background: green;text-align: center”>W?glowodany</td>’;
echo ‘<td class=”fl-menu-item-tabs” width=”25%” style=”background: green;text-align: center”>T?uszcze</td>’;
echo ‘</tr>’;
echo ‘<tr>’;
echo ‘<td class=”fl-menu-item-data”>[menu_item_energetic]</td>’;
echo ‘<td class=”fl-menu-item-data”>[menu_item_bialko]</td>’;
echo ‘<td class=”fl-menu-item-data”>[menu_item_weglowodany]</td>’;
echo ‘<td class=”fl-menu-item-data”>[menu_item_tluszcze]</td>’;
echo ‘</tr>’;
echo ‘</table>’;
}
?>
</div>
</div>
<div class=”clear”></div>
</div>any idea?
- The topic ‘PHP code in menu item template’ is closed to new replies.