Reputation: 49
I am new to Smarty code and was just wondering if you can provide me with PHP equivalent to this piece of smart code..
<div class = "span3">
<a href = "{$auction->get('links.details')}"><div id="raffle-list-img">
{if $current_item->get('imagecount')}
{$current_item->get('gallery')}
{/if}
</div></a>
</div>
This was in a .tpl file and I need it placing in a .php file.
Im trying to make an auction item to show a photo.
Thank you for your help.
Upvotes: 0
Views: 93
Reputation: 1808
Smarty is very close to standard PHP, so you can normally do an almost direct conversion between the two:
<div class="span3">
<a href="<?php $auction->get('links.details') ?>">
<div id="raffle-list-img">
<?php
if( $current_item->get('imagecount') ) {
echo $current_item->get('gallery');
}
?>
</div>
</a>
</div>
I reformatted/reindented to make it more readable.
Upvotes: 1
Reputation: 26
well actually it won't be much more readable but I believe it will look like that : <div class = "span3">
<a href = "<?php $auction->get('links.details'); ?>"><div id="raffle-list-img">
<?php if ($current_item->get('imagecount')) {
$current_item->get('gallery');
} ?>
</div></a>
</div>
Upvotes: 0