File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1515return function () {
1616 return [
1717 [
18- 'pattern ' => 'listings/(:alpha )/(:all) ' ,
18+ 'pattern ' => 'listings/(:all )/(:all) ' ,
1919 'method ' => 'GET ' ,
2020 'action ' => function ($ language_code , $ path ) {
2121 $ content = [];
Original file line number Diff line number Diff line change 8989 // This method is provided only for compatibility reasons,
9090 // to help the users of older plugin versions
9191 'toNavigationStructure ' => function ($ field ) {
92- // Refresh items to get the current multilang URL and page titles
93- // and set item values needed for markup generation
94- $ items =$ field ->toNavigationArray ();
9592 // Use anonymous recursive function to process child items
9693 $ process_item = function ($ key , $ item ) use (&$ process_item ) {
9794 // Preserve any original 'id' value as 'link_id'
98- $ items ['link_id ' ]=$ item ['id ' ] ?? '' ;
95+ $ item ['link_id ' ]=$ item ['id ' ] ?? '' ;
9996 // Overwrite the 'id' (slug) value in link items,
10097 // because the Structure class also uses it as index
10198 $ item ['id ' ]=$ key ;
107104 }
108105 return $ item ;
109106 };
107+ // Refresh items to get the current multilang URL and page titles
108+ // and set item values needed for markup generation
109+ $ items =$ field ->toNavigationArray ();
110110 if (is_array ($ items ) && $ items ) {
111111 foreach ($ items as $ key => $ item ) {
112112 $ items [$ key ]=$ process_item ($ key , $ item );
You can’t perform that action at this time.
0 commit comments