#3486 - Language specific menu ordering
0 guests and 0 members have recently viewed this.
The top 3 point earners from 8th Feb 2026 to 15th Feb 2026.
| Gabri |
|
|
|---|---|---|
| Master Rat |
|
|
| PDStig |
|
|
There are no events at this time
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.
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.