Problem with I18N navigation menu - 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: Problem with I18N navigation menu (/showthread.php?tid=9497) |
Problem with I18N navigation menu - BF68 - 2017-02-05 Hi There, Just started with GetSimple which I wnat to use to rebase my private website. My current private website at www.lieberlinge.de is completely handmade and somewhat outdated. The goals of rebasing it on a CMS like GetSimple are:
However I struggle to get it to work. I have built the following pages: 20170205_Screenshot1 by Bernie None, auf Flickr I use the theme "ThemeSettingsDemo" and in it's default template.php I have the following mostly unchanged section: PHP Code: <div id="main"> But if I call the site it shows the following 20170205_Screenshot2 by Bernie None, auf Flickr Where I miss in the red circle the expected navigation menu. Anyone any idea how to fix the issue? Many thanks in advance! Bernhard RE: Problem with I18N navigation menu - Bigin - 2017-02-05 Select "Add this page to the menu" checkbox under the Page options http://get-simple.info/forums/showthread.php?tid=1256&pid=57804#pid57804 RE: Problem with I18N navigation menu - BF68 - 2017-02-05 Was of course already checked, see Any other thoughts? I rund the webserver on my private Synology NAS system. What I did just lately is that I updated access rights for the group "http" on the Synology from "read-only" to "full-Access". Still without any improvement... RE: Problem with I18N navigation menu - BF68 - 2017-02-05 Hi All, Seems I've solved the first issue. Insufficient access rights for the webserver on my NAS apparently have been the root cause. After configuring proper access rights on the NAS and after editing the menu structure in GetSimple I18N again it works (almost) as desired: 20170205_Screenshot4 by Bernie None, auf Flickr Now I have the following question: How can I get a behaviour of the left-side navigation menu where first only the top-level entries are shown an if for instannce "Hobbies" is clicked then the menu opens and shows the sub-entries "Mountainbike" in this case? Is this possible? And apologies, if this is a stupid question but I'm total newbie to php and to GetSimple. On the other hand I can code some perl so it should not be too difficult for me to understand the basics. I'm looking forward to any hint. Best regards Bernhard RE: Problem with I18N navigation menu - BF68 - 2017-02-05 Ah figured it already out, I18N_SHOW_NORMAL does the job, now on to the next challenge: How can I have a menu as in the above sample where a click to "Hobbies" does NOT open a page but only opens the submenu? Is this possible? RE: Problem with I18N navigation menu - Tyblitz - 2017-02-06 (2017-02-05, 20:12:26)BF68 Wrote: Ah figured it already out, I18N_SHOW_NORMAL does the job, now on to the next challenge: Hi there, BF68, There is no such feature included out of the box that I know of. A while ago I wrote a function for I18N navigation where:
The code is the following (include it in your theme): PHP Code: function i18nMenuNoLandingPages($links, $loop = 0) { And you use it like this: PHP Code: $nav = return_i18n_menu_data(return_page_slug(),0,5,I18N_SHOW_MENU); However: depending on your .htaccess rewrite rules and whether you use pretty urls, you will need to change one line in the code. In your admin dashboard, have you checked "Use fancy URLs?" and set a custom permalink structure? This code was written for a permalink structure like: /%parent%/%slug%/ (eg. http://mysite/hobbies/fishing). RE: Problem with I18N navigation menu - BF68 - 2017-02-06 (2017-02-06, 04:45:37)Tyblitz Wrote: Hi there, BF68, Hi There, Many thanks for the reply and the suggestion. This sounds great. I will have time only next weekend to work with it and test it in my environment. I'll keep you posted Have a great week! RE: Problem with I18N navigation menu - BF68 - 2017-02-12 (2017-02-06, 04:45:37)Tyblitz Wrote:(2017-02-05, 20:12:26)BF68 Wrote: Ah figured it already out, I18N_SHOW_NORMAL does the job, now on to the next challenge: Hy Tyblitz, Unfortunately your function does not really what I expect as it opens all submenues instantly and not only when someone clicks on the menu entry. Do you have any hint about how to modify your code to get the thing done? RE: Problem with I18N navigation menu - Tyblitz - 2017-02-15 (2017-02-12, 03:59:59)BF68 Wrote: Hy Tyblitz, Hi BF68, This function only generates the navigation structure in the HTML. The click/hover/whatever-you-want behavior is entirely up to you (this is a function, not a plugin). In the example site I provided, it's done with CSS :hover (on mobile, this will open on click), but you can use Javascript/jQuery to make it behave as you wish. You should know some basic CSS/JS, or you can try a jQuery plugin like this one. |