Template structure in $ydb->template + function to manipulate it