Add filter so pagination atts can be changed.
Set correct pagination format determined by if using permalinks or not.