def write_link_tuple(loc, sub=False): if not sub: link_content = loc.name else: link_content = '<span class="sub_link">%s</span>' %(loc.name) if loc.microsite_active: return (loc.url + '/public/', link_content) else: map_entry = PublicPlace.select(AND(PublicPlace.q.name == loc.name.lower())) if map_entry.count(): return ('http://the-hub.net/places/' + loc.name.lower(), link_content)
def write_link_tuple(loc, sub=False): if not sub: link_content = loc.name else: link_content = '<span class="sub_link">%s</span>' %(loc.name) if loc.microsite_active: if loc.id == 88: return ('http://www.hubwestminster.net/', link_content) return (loc.url + '/public/', link_content) else: if loc.id == 22: # #236 return ('http://www.the-hub.co.il/home-en', loc.name) elif loc.id == 60: return ('http://www.hubzurich.org/', 'Zürich') map_entry = PublicPlace.select(AND(PublicPlace.q.name == loc.name.lower())) if map_entry.count(): return ('http://the-hub.net/places/' + loc.name.lower(), link_content)