  We define when a ternary term $m$ of an algebraic language $\mathcal{L}$ is
called a \textit{distributive nearlattice term} (DN-term) of a sentential logic
$\mathcal{S}$. Distributive nearlattices are ternary algebras generalising
Tarski algebras and distributive lattices. We characterise the selfextensional
logics with a DN-term through the interpretation of the DN-term in the algebras
of the algebraic counterpart of the logics. We prove that the canonical class
of algebras (under the point of view of Abstract Algebraic Logic) associated
with a selfextensional logic with a DN-term is a variety, and we obtain that
the logic is in fact fully selfextensional.
