This question has been answered by BobRay. See the first response.
Setting it to 0 should put it at the top, but only if the other TVs on the list are set to higher values. If they're all 0, they'll usually be in the order they appear in the DB, iow, the order in which they were first created.
$c->sortby('cat_category,TemplateVarTemplate.rank,modTemplateVar.rank','ASC');
Hmm... I found this in the TV controller under the resource controller:
$c->sortby('cat_category,TemplateVarTemplate.rank,modTemplateVar.rank','ASC');
Apparently, the rank of the TemplateVarTemplate object takes precedence over the TV's rank (and the TV's category takes precedence over both).
So ... try editing the Template they belong to and setting the rank on the "Template Variables" tab. You only need to do this for TVs in a particular category (since that's the first sort criteria). I guess the reasoning for this is that you might want to have them in a different order for resources with different templates.
Let me know if it works.
Hmm... I found this in the TV controller under the resource controller:
$c->sortby('cat_category,TemplateVarTemplate.rank,modTemplateVar.rank','ASC');
Apparently, the rank of the TemplateVarTemplate object takes precedence over the TV's rank (and the TV's category takes precedence over both).
So ... try editing the Template they belong to and setting the rank on the "Template Variables" tab. You only need to do this for TVs in a particular category (since that's the first sort criteria). I guess the reasoning for this is that you might want to have them in a different order for resources with different templates.
Let me know if it works.