Show pagination only when required