def pagelink(self, on, pagename='', page=None, **kw): FormatterBase.pagelink(self, on, pagename, page, **kw) if page is None: page = Page(self.request, pagename, formatter=self) link_text = page.link_to(self.request, on=on, **kw) self._curr.xml_append(tree.text(U(link_text))) return ''
def pagelink(self, on, pagename="", page=None, **kw): FormatterBase.pagelink(self, on, pagename, page, **kw) if page is None: page = Page(self.request, pagename, formatter=self) link_text = page.link_to(self.request, on=on, **kw) self._curr.xml_append(tree.text(U(link_text))) return ""
def pagelink(self, on, pagename='', page=None, **kw): """ Link to a page. formatter.text_python will use an optimized call with a page!=None parameter. DO NOT USE THIS YOURSELF OR IT WILL BREAK. See wikiutil.link_tag() for possible keyword parameters. """ FormatterBase.pagelink(self, on, pagename, page, **kw) if page is None: page = Page(self.request, pagename, formatter=self) return page.link_to(self.request, on=on, **kw)
def pagelink(self, on, pagename='', page=None, **kw): FormatterBase.pagelink(self, on, pagename, page, **kw) if on: if not self._textbuf or self._textbuf[-1] in ('\n', ' '): result = self.wrap(u'<') else: result = self.wrap(u' <') self.text_on(True) self.add_missing_space() return result else: linktext = self._text self.text_off() orig_pagename = pagename if pagename.find('/'): pagename = pagename.replace('/', '.') pagename += '.txt' if linktext == orig_pagename: return self.wrap(u'%s>' % pagename) else: return self.wrap(u'%s> [%s]' % (linktext, pagename))
def pagelink(self, on, pagename='', page=None, **kw): FormatterBase.pagelink(self, pagename, page, **kw) if not pagename and page is not None: pagename = page.page_name kw['pagename'] = pagename return self._set_tag('pagelink', on, **kw)
def pagelink(self, on, pagename='', page=None, **kw): FormatterBase.pagelink(self, on, pagename, page, **kw) return self.interwikilink(on, 'Self', pagename, **kw)
def pagelink(self, on, pagename='', page=None, **kw): FormatterBase.pagelink(self, on, pagename, page, **kw) return self.null()
def pagelink(self, on, pagename='', page=None, **kw): FormatterBase.pagelink(self, on, pagename, page, **kw) if page is None: page = Page(self.request, pagename, formatter=self) return page.link_to(self.request, on=on, **kw)
def pagelink(self, on, pagename='', page=None, **kw): FormatterBase.pagelink(self, on, pagename, page, **kw) return (u">>", u"<<") [not on]