Add next/prev directive