Issue Feature Closed

#70964Allow sorting = rand() for special = categories (HMENU)

Lars Büsing 10/23/15, 01:17 updated 01/15/20, 21:56

Description

The MySQL function “rand()” can be used in some HMENU objects as a ‘sorting’ string, as it is directly inserted after “ORDER BY” in the sql statement. In the “special = categories” menu though, only existing fields are allowed.

It should be possible (and easy) to apply random ordering in category menus, e.g. for menus containing a limited amount of related pages. To keep in line with the unoffical way of randomizing other menu lists, the expression “rand()” could be used.

    10 = HMENU
    10 {
      special = categories
      special {
        value = 1
        sorting = rand()
      }
      [...]
    }

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.