Jump to content

Mattia90

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

528 profile views

Mattia90's Achievements

Newbie

Newbie (2/6)

0

Reputation

  1. Hi @kongondo! Thank you for your reply. Now I explain in a detailed way what I did: 1) My idea was to create a web site both in English and in Italian and in order to do this, according to the official documentation of ProcessWire, I installed all the modules that you can find under the voice "Language" (Language Support) : in the admin page, Modules -> Core; 2) I have created a menu by means of admin page: Setup -> Menu Builder and here I created a menu with title "Menu_X" and then I built the menu by adding the pages that I wanted. 3) In order to have this web site in Italian and in English, in order to have the possibility to switch from one language to the other one, I added in each page this piece of code taken from the official documentation of ProcessWire: $menu = $modules->get("MarkupMenuBuilder"); //load the module $options = array( 'wrapper_list_type' => 'ul', 'list_type' => 'li', 'menu_css_id' => '', 'menu_css_class' => 'nav navbar-nav', 'submenu_css_class' => 'hvr-bounce-to-bottom', 'current_class' => 'active', 'current_css_id' => '', 'divider' => '»',// e.g. Home >> About Us >> Leadership //prepend home page at the as topmost item even if it isn't part of the breadcrumb 'prepend_home' => 0,//=> 0=no;1=yes 'default_title' => 0,//0=show saved titles;1=show actual/current titles 'include_children' => 4,//show 'natural' MB non-native descendant items as part of navigation 'b_max_level' => 1,//how deep to fetch 'include_children' ); echo $menu->render('Menu_X', $options); //render the menu This is a select that allows to switch from English to Italian and viceversa. 4) Now when I created the "Menu_X", there wasn't the possibility to specify the titles of the different menu items in both languages and also the different urls: in fact the menu works only in the default language (English); what it seems strange is that when I switch from English to Italian, this error appears: "Fatal error: Exception: No menu items found! Confirm that such a menu exists and that it has menu items." In the worst case, what I expected is to have the same menu both in Italian and in English. I would like to have how to create a multilingual menu with the right urls by means of Menu Builder. Thanks in advance.
  2. Hi all! I am new to PW and I am using the module MenuBuilder just for creating the menu of my web site, but I have a problem when I swicth language from English to another; in fact when I switch to Italian language for example, the menu does not appear and sometimes an error appears ("Error: No menu items found"). I would like to ask if somebody knows how to create a multilanguage menu by means of Menu Builder and if yes, can show me how to do it. Thanks in advance
×
×
  • Create New...