Created
December 15, 2016 19:58
-
-
Save DZuz14/d6aff98765e1c58b063a19499d24daf7 to your computer and use it in GitHub Desktop.
Zen dropdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The below command is creating a variable that loads the 'departures' template, and loads its children. | |
// I am curious as to where the date is getting it's instructions on how to display itself. | |
// Hoping you can shed some light onto the subject. | |
$departures = $page->get('template=departures')->children('template=departure'); | |
<div class="ctaBox-departure"> | |
<label for="departure"> | |
<?=__('Departure Date')?>: </label> | |
<select name="departure"> | |
<? foreach($departures as $departure): ?> | |
<? if(!$departure->isClosed()): ?> | |
<option value="<?= $departure->id ?>"> <?= $departure->departure_date ?> (<?= renderPrice($departure->getPrice()) ?>)</option> | |
<? endif ?> | |
<? endforeach ?> | |
</select> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment