Non-Clickable Links for il8N Navigation? - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13) +--- Thread: Non-Clickable Links for il8N Navigation? (/showthread.php?tid=4780) |
Non-Clickable Links for il8N Navigation? - lnickel - 2013-05-25 This plugin does the job and kicks arse!!!! Thanks mvlcek for all your work!! I have one question and I'm sure I'll have many more but is it possible to pin point any of the links printed out and make them non-links. So something like this where any of these items simply do not have a page assigned only to hover to show other children links. Perhaps the parent link is not clickable but shows the children. Is this possible? Parent Link -----Child Link -----Child Link ---------Child Child Link Again, a huge thank your time!!!! thanks Lance RE: Non-Clickable Links for il8N Navigation? - mvlcek - 2013-05-25 (2013-05-25, 00:24:54)lnickel Wrote: This plugin does the job and kicks arse!!!! Thanks mvlcek for all your work!! I have one question and I'm sure I'll have many more but is it possible to pin point any of the links printed out and make them non-links. You will need to use custom rendering and display a link or no link depending on $item->hasChildren. RE: Non-Clickable Links for il8N Navigation? - lnickel - 2013-05-25 (2013-05-25, 01:58:11)mvlcek Wrote:(2013-05-25, 00:24:54)lnickel Wrote: This plugin does the job and kicks arse!!!! Thanks mvlcek for all your work!! I have one question and I'm sure I'll have many more but is it possible to pin point any of the links printed out and make them non-links. Thank you for your assistance!! I'm not sure how to implement that. Currently I have : Code: <ul class="megamenu"> I'm not sure how to implement the code you provide on your site: Code: <li class="<?php echo $item->classes; ?>"> What do I reference in the component var? I appreciate your help!!!!! RE: Non-Clickable Links for il8N Navigation? - lnickel - 2013-05-25 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; ?>"> Heck I'm such a PHP noob its embarassing!! [attachment=193] 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. RE: Non-Clickable Links for il8N Navigation? - mvlcek - 2013-05-25 (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; ?>"> You could of course also write the else-part simply as Code: <?php } else { echo htmlspecialchars($item->text); } ?> RE: Non-Clickable Links for il8N Navigation? - lnickel - 2013-05-25 Thanks mvlcek! I'll give it a try and see! Thank you!!! Update: I gave it a try and it worked. Can it get more granular than that? Some links may have children but dont actually have it's own page. Sorry for all the ?'s!!!!! I will keep hunting! Thanks for your input! RE: Non-Clickable Links for il8N Navigation? - Angryboy - 2013-05-30 Did you manage to do this, lnickel? If not (or just as a reference for others hoping to do the same), you can use Custom Fields to create a custom status (like 'nopage') for pages in the menu that takes either the value 'true' or 'false'. Then to alter the appearance of pages in the menu that have children (but do not have their own pages) use a conditional statement like: Code: if($item->hasChildren && $item->nopage=='true') { RE: Non-Clickable Links for il8N Navigation? - lnickel - 2013-05-31 (2013-05-30, 21:40:32)Angryboy Wrote: Did you manage to do this, lnickel? Aw man Angryboy!!! You made me a happyBoy! I will try this in a jiffy! I was converting everything to wp....was frustrated! I will use this on my next project. Many thanks!!! RE: Non-Clickable Links for il8N Navigation? - Angryboy - 2013-05-31 Hope it's helpful. If you're feeling the urge to convert to WordPress again in the future due to any GetSimple frustrations, feel free to PM me. *smiles* [For future reference: if you have plugin-specific queries, it is better to keep those questions in the support threads that the original authors publish.] RE: Non-Clickable Links for il8N Navigation? - lnickel - 2013-05-31 (2013-05-31, 01:26:46)Angryboy Wrote: Hope it's helpful. If you're feeling the urge to convert to WordPress again in the future due to any GetSimple frustrations, feel free to PM me. *smiles* Thanks angryboy. I was on a time constrained project and really wanted to use GS. As with anything there is a learning curve - I should of really taken that into consideration. I'm well versed into wp and themeing so I went back only because of the time but teetering on just using GS.... I really want to just use GS for future projects because of the 'no-fuss' editing. I don't need that layer for management like clients do. Many thanks!!! Sorry for putting this in the wrong place! RE: Non-Clickable Links for il8N Navigation? - mackur - 2014-11-28 Hello, I would like non clickable only top level menu if I have a children. I use in template: Code: <?php if(function_exists(get_i18n_navigation)){ get_i18n_navigation($slug, $minlevel=0, $maxlevel=2, $show=I18N_SHOW_MENU, $component=null); } else { get_navigation(get_page_slug(FALSE)); }} ?> Could you help me RE: Non-Clickable Links for il8N Navigation? - Oleg06 - 2014-11-28 Code: <?php function_exists('get_i18n_navigation') ? get_i18n_navigation(return_page_slug(), 0, 100, I18N_SHOW_MENU) : get_navigation(return_page_slug()); ?> RE: Non-Clickable Links for il8N Navigation? - mackur - 2014-11-28 Thanks for code (2014-11-28, 16:49:22)Oleg06 Wrote: After my pasted also top level menu which has a children is clickable and is link. Mayby I must change something in file frontend.class.php RE: Non-Clickable Links for il8N Navigation? - Oleg06 - 2014-11-28 http://get-simple.info/forums/showthread.php?tid=4780&pid=36754#pid36754 http://mvlcek.bplaced.net/get-simple/multi-level-navigation/navigation-rendering RE: Non-Clickable Links for il8N Navigation? - lnickel - 2014-11-29 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; ?>"> 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,100, I18N_SHOW_MENU, 'links'); ?> RE: Non-Clickable Links for il8N Navigation? - mackur - 2014-11-30 Thank you very much. It works very nice RE: Non-Clickable Links for il8N Navigation? - sal - 2014-12-01 A similar way I do it that also uses I18N Custom Fields is I create a custom field called "redirect" and then structure the pages so that if the parent is supposed to link to the first child, then the parent page has no content but has the URL of the first child (either root-relative or absolute) in the "redirect" field. Then in the theme's template.php file, I add the following PHP before any HTML is output: PHP Code: <?php This is also a little more flexible as you can add external links to your primary navigation too using this method. RE: Non-Clickable Links for il8N Navigation? - tomkow - 2022-11-01 (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 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 RE: Non-Clickable Links for il8N Navigation? - tomkow - 2022-11-24 SOLVED: replace I18nNavigationItem with __construct in line:361 in plugins/i18n_navigation/frontend.class.php |