Requirement: Get the name of the column category in the article list
First associate the 2 models: belongsTo
public function adposition()
{
return $this->belongsTo('AdPosition','pos_id', 'pos_id')->field('pos_id,pos_name');
}
This establishes the association, and then uses the association to preload when fetching the list: with
public function get_list(){
return $this->with('adposition')->select();
}
then in the template use
{volist name="list" id="vo"}
{$vo.adposition.pos_name}
{/ volist}