yes,
that’s what i suggested above, according to the comment, it may be a bit randomly... actually, not that random if i have a look at one of my pages with a lot of tvs, they seem to be in an alpha order... but i haven’t set any rank...
now for what i can see in yams source
// Get the names and ids of all the multilingual template variables
// ending in _{langid}
$result = $modx->db->select(
'id,name,rank'
, $modx->getFullTableName('site_tmplvars')
, 'name LIKE \'%\_' . $modx->db->escape( $langId ) . '\''
);
$nRows = $modx->db->getRecordCount( $result );
// Loop over the multilingual tvs and sort into custom and standard.
// The standard ones are ordered in the normal order.
// The custom ones are ordered as is (by probably should respect the
// tv order specified in the database...)
// For each tv, calculate the name required by ManagerManager
$standardTVs = array();
$customTVs = array();
for ( $i = 0; $i < $nRows; $i++ )
{
$idNameArray = $modx->db->getRow( $result );
$name = $idNameArray['name'];
$id = $idNameArray['id'];
$rank = intval( $idNameArray['rank'] );
switch ( $name )
{
case 'pagetitle_' . $langId:
$standardTVs['1'] = YAMSTVDataToMMName( $name, $id, 'tv', $mm_version );
break;
case 'longtitle_' . $langId:
$standardTVs['2'] = YAMSTVDataToMMName( $name, $id, 'tv', $mm_version );
break;
case 'description_' . $langId:
$standardTVs['3'] = YAMSTVDataToMMName( $name, $id, 'tv', $mm_version );
break;
case 'alias_' . $langId:
if ( $useMultilingualAliases )
{
$standardTVs['4'] = YAMSTVDataToMMName( $name, $id, 'tv', $mm_version );
}
break;
case 'introtext_' . $langId:
$standardTVs['5'] = YAMSTVDataToMMName( $name, $id, 'tv', $mm_version );
break;
case 'menutitle_' . $langId:
$standardTVs['6'] = YAMSTVDataToMMName( $name, $id, 'tv', $mm_version );
break;
case 'content_' . $langId:
$standardTVs['7'] = YAMSTVDataToMMName( $name, $id, 'tv', $mm_version );
break;
default:
if ( array_key_exists( $rank, $customTVs) )
{
$customTVs[] = YAMSTVDataToMMName( $name, $id, 'tv', $mm_version );
}
else
{
$customTVs[$rank] = YAMSTVDataToMMName( $name, $id, 'tv', $mm_version );
}
}
}
// sort the standard tvs
ksort( $standardTVs );
ksort( $customTVs );
$nStandardTVs = count( $standardTVs );
$nCustomTVs = count( $customTVs );
and, a little further
as you can see, yams retreives id, name and rank for a tv and, later, tries to order them by rank, but if the rank already exists, will put the tv in the array as it comes...
if ( array_key_exists( $rank, $customTVs) )
{
$customTVs[] = YAMSTVDataToMMName( $name, $id, 'tv', $mm_version );
}
else
{
$customTVs[$rank] = YAMSTVDataToMMName( $name, $id, 'tv', $mm_version );
}
that means that if you want your tvs to be ordered by rank, you may try to start with a rank higher than YAMS and MODx "native" tv higher one (well, let’s say, try starting ordering your tv with 20 or so, it should avoid your tvs falling into the
if ( array_key_exists( $rank, $customTVs) )
condition
hope it helps
Have swing