'Compute the value of an attribute while rendering the template.'

def _website_build_attribute(self, tagName, name, value, options, values):

    if ((name == self.URL_ATTRS.get(tagName)) and values.get('url_for')):
        return values.get('url_for')((value or ''))
    elif (request and getattr(request, 'website', None) and request.website.cdn_activated and ((name == self.URL_ATTRS.get(tagName)) or (name == self.CDN_TRIGGERS.get(tagName)))):
        return request.website.get_cdn_url((value or ''))
    return value
