added viewport def to pass to templates