Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Non-Clickable Links for il8N Navigation?
Try using the I18N Custom Fields.

1. Install the plugin
2. Create two fields - one with something like noPage for the name, noPage for the label and select the Type to be Dropdown. Give it two selections with the something like hasLink and no Link then save
3. Go to one of your pages and now you should be able to see those custom fields in the page options.
4. Go to components and input something like this into a new component and name it 'links'.
This will rewrite the general output of the il8n nav.

PHP Code:
<li class="<?php echo $item->classes; ?>">
if ($item->nopage == 'noLink') {
          elseif (
$item->nopage == 'hasLink') { ?>
             <a href="<?php echo htmlspecialchars($item->link); ?>">
                <?php echo htmlspecialchars($item->text); ?>
          <?php }
          else { 
             <a href="<?php echo htmlspecialchars($item->link); ?>">
                <?php echo htmlspecialchars($item->text); ?>
      <?php }?>
        <?php if ($item->isOpen) { ?>
              <button class="toggleExpand"><i class="fa fa-arrow-circle-right"></i></button>
                <ul class="sub-menu"><?php $item->outputChildren(); ?></ul>
          <?php ?>

5. Now in your navigation code in your template (if you are using I18N navigation) which you probably should be. Pass the 'links' param into that piece of code like this. This will give the option to turn off the link for the navigation via the page options. Its a per item thing.

PHP Code:
<?php get_i18n_navigation(return_page_slug(),0,100I18N_SHOW_MENU'links'); ?>

Messages In This Thread
RE: Non-Clickable Links for il8N Navigation? - by lnickel - 2014-11-29, 00:04:35

Users browsing this thread: 1 Guest(s)