[Solved] Writing an IF statement [closed]


Something like this should work:

<div class="<?php echo $this->getSize(); ?>">
  <?php if (!empty($this->getBlockLink())) : ?>
    <a href="https://stackoverflow.com/questions/25530264/<?php echo $this->getBlockLink(); ?>">
  <?php endif; ?>
  <span class="grid grid--full">
    <span class="grid__item <?php echo $this->getTextPosition() . ' ' .  $this->getTextWidth(); ?>">
      <?php echo $this->getBlockFormattedContent(); ?>
    </span>
    <img src="<?php echo $this->getImage(); ?>">
  </span>
  <?php if (!empty($this->getBlockLink())) : ?>
    </a>
  <?php endif; ?>
</div>

solved Writing an IF statement [closed]