You are here

good.tpl.php in Coder 8.2

Valid example template file.

Alternative control structure style is allowed as well as curly brackets.

File

coder_sniffer/Drupal/Test/good/good.tpl.php
View source
<?php

/**
 * @file
 * Valid example template file.
 *
 * Alternative control structure style is allowed as well as curly brackets.
 */
?>
<div>
<?php

if (TRUE) {
  ?>
  <a href="<?php

  print $front_page;
  ?>" title="<?php

  print t('Home');
  ?>" id="logo">
    <img src="<?php

  print $logo;
  ?>" alt="<?php

  print t('Home');
  ?>" />
  </a>
<?php

}
else {
  ?>
  <i>some text</i>
<?php

}
?>
</div>
<div>
<?php

if (TRUE) {
  ?>
  <a href="<?php

  print $front_page;
  ?>" title="<?php

  print t('Home');
  ?>" id="logo">
    <img src="<?php

  print $logo;
  ?>" alt="<?php

  print t('Home');
  ?>" />
  </a>
<?php

}
else {
  ?>
  <i>some text</i>
<?php

}
?>
</div>
<br />
<?php

print $foo;
?>
  <?php

print l($app['icon'], $app['site_url'], array(
  'html' => TRUE,
  'attributes' => array(
    'target' => '_blank',
  ),
));