Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Non-Clickable Links for il8N Navigation?
#18
(2013-05-25, 06:31:47)mvlcek Wrote:
(2013-05-25, 06:18:58)lnickel Wrote: So I take this code and make a component from it and call it it as a param in the get_nav function. Cool. Just dont know how to do the if/else

PHP code between <?php and ?>, HTML outside:
Code:
<li class="<?php echo $item->classes; ?>">
  <?php if ($item->hasChildren) { ?>
     <a href="<?php echo htmlspecialchars($item->link); ?>">
       <?php echo htmlspecialchars($item->text); ?>
     </a>
  <?php } else { ?>
     <?php echo htmlspecialchars($item->text); ?>
  <?php } ?>

  <?php if ($item->isOpen) { ?>
    <ul><?php $item->outputChildren(); ?></ul>
  <?php } ?>
</li>

You could of course also write the else-part simply as
Code:
  <?php } else { echo htmlspecialchars($item->text); } ?>

Hi mvlcek,
I am using i18n for php8 but the component paramter doesn't work, is possible to fix it? I need to put there a custom rendering. Thanks
Reply


Messages In This Thread
RE: Non-Clickable Links for il8N Navigation? - by tomkow - 2022-11-01, 00:44:25



Users browsing this thread: 1 Guest(s)