Adding page sorting by weight function (the default)