[Moin-user] anchor keyword added to link_to in Page.py

bragiba at simi.is bragiba at simi.is
Thu Dec 6 07:39:02 EST 2001


I finally got around to adding the anchor keyword to link_to:

    def link_to(self, text=None, querystr=None, anchor=None):
        """Return HTML markup that links to this page"""
        word = self.page_name
        text = text or word
        fmt = getattr(self, 'formatter', None)
        url = wikiutil.quoteWikiname(word)
        if querystr: url = "%s?%s" % (url, querystr)
        if anchor: url = "%s#%s" % (url, anchor)
        if self.exists():
            return wikiutil.link_tag(url, text, formatter=fmt)
        else:
            if config.nonexist_qm:
                return wikiutil.link_tag(url,
                    '?', 'nonexistent', formatter=fmt) + text
            else:
                return wikiutil.link_tag(url,
                    text, 'nonexistent', formatter=fmt)


Með kveðju/Best Regards
Bragi Baldursson
GPRS Kerfisverkfræðingur/GPRS Systems Engineer
Sími/Tel.:  550 63 08    mailto:bragiba at siminn.is
Fax:  550 63 39    www:http://www.siminn.is
Gsm:   892 63 08

- Síminn auðveldar samskipti -

_______________________________________________________________________
Þessi tölvupóstur og viðhengi hans gætu innihaldið trúnaðarupplýsingar
eingöngu ætlaðar þeim sem hann er stílaður á. Efni tölvupóstsins og
viðhengi er á ábyrgð sendanda ef það tengist ekki starfsemi Símans.
Sjá nánar: http://www.siminn.is/um_okkur/almennt/tolvupostur.asp

This e-mail and its attachments may contain confidential and privileged
information only intended for the person or entity to which it is
addressed.
Further information: http://www.siminn.is/english/about_us/email.asp
_______________________________________________________________________


More information about the Moin-user mailing list