Can anyone lend a hand?
Line 12:
<li class="find<?php echo ($page->isOpen()) ? ' active">' : ?>">Find</li>
Try:
<li class="find <?php echo ($page->isOpen() ? 'active'); ?>">Find</li>
@TheDoc I got the following
syntax error, unexpected ')'
I ended up solving it by doing this:
<?php foreach($pages->invisible()->slice(1, 1) AS $p): ?> <li class="<?php echo html(str::lower($p->title())) ?><?php echo ($p->isOpen()) ? ' active' : '' ?>"><?php echo html($p->title()) ?></li> <?php endforeach ?>
<?php echo ($p->isOpen()) ? ' active' : '' ?>
Any reason for the ternary operator?
<?php if($p->isOpen()) echo ' active' ?>
@BenWalker Thank you!!! I literally just copied it from the foreach statement above it with just a few alterations.
Can anyone lend a hand?
Line 12:
Try:
@TheDoc I got the following
I ended up solving it by doing this:
Any reason for the ternary operator?
@BenWalker Thank you!!! I literally just copied it from the foreach statement above it with just a few alterations.