from pylons import config, g
from pylons.i18n import _


def name():
    return config.get('adhocracy.site.name', _("Adhocracy"))


def base_url(instance, path=None):
    url = "%s://" % config.get('adhocracy.protocol', 'http').strip()
    if instance is not None and g.single_instance is None:
        url += instance.key + "."
    url += config.get('adhocracy.domain').strip()
    if path is not None:
        url += path
    return url


def shortlink_url(delegateable):
    path = "/d/%s" % delegateable.id
    return base_url(None, path=path)

@@ -50,16 +50,88 @@
 ort _%0A%0A%0A
+def domain():%0A    return config.get('adhocracy.domain').split(':')%5B0%5D%0A%0A%0A
 def name

Add h.site.domain() to return the domian without the port