Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Non-Clickable Links for il8N Navigation?
#4
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

I've tried it but doesnt work.

Code:
<li class="<?php echo $item->classes; ?>">
  <?php if ($item->hasChildren) {
     <a href="<?php echo htmlspecialchars($item->link); ?>">
    <?php echo htmlspecialchars($item->text); ?>
  </a>

} else {
     <?php echo htmlspecialchars($item->text); ?>
} ?>

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

Heck I'm such a PHP noob its embarassing!!Big Grin

   

Here is what I'm trying to achieve. Some of the list items weather or not they are parent or child are not click-able.
Reply


Messages In This Thread
RE: Non-Clickable Links for il8N Navigation? - by lnickel - 2013-05-25, 06:18:58



Users browsing this thread: 1 Guest(s)