#3486 - Language specific menu ordering

This is a spacer post for a website comment topic. The content this topic relates to: #3486 - Language specific menu ordering
That's not really feasible due to the way the system is implemented. The translation is happening at the string level, not the level of the menu itself.

You could create different menus however, and use Tempcode to show the menu based on language. Or you could drop down to the level of HTML in templates and just implement multiple of them by hand in HTML.
Okay I will probably go the Tempcode route, thank you.
Also you could hack sources/menus.php like this...

diff --git a/sources/menus.php b/sources/menus.php
index a335b92e6..36bc12b55 100644
--- a/sources/menus.php
+++ b/sources/menus.php
@@ -648,6 +648,8 @@ function _render_menu_branch($branch, $codename, $source_member, $level, $type,
$new_children = array();
$expand_this = false;
if (isset($branch['children'])) {
+ if ($branch['title']->evaluate() == 'Content') sort_maps_by($branch['children'], 'title');
+
foreach ($branch['children'] as $child) {
list($children2, $_expand_this) = _render_menu_branch($child, $codename, $source_member, $level + 1, $type, $as_admin, $all_branches, $apply_highlighting, $the_level + 1);
if ($_expand_this) {


That's making the menu of title 'Content' sort it's children.

I don't want to add an official feature to do this, but it's a simple change to the code.
0 guests and 0 members have recently viewed this.