[dokuwiki] Understanding returnonly parameter

  • From: Lars Paulsen <lars_paulsen@xxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 8 Jun 2016 17:39:51 +0200

Hi @all,

I got an understanding problem with the "returnonly" parameter for link functions in renderers,
e.g. "function internallink($id, $name = NULL, $returnonly = false)".

I am just doing a redesign of the ODT plugin and do not want to break things.
Also I would like to understand what the parameter is doing or better say why it is doing what it is doing.
What I think it is doing is the following:
- if set to false everything works normal. Links are created and written into the document.
- if set to true:
- internal links are encoded as links but not written to the document, they are only returned to the caller.
- external links are not encoded as links nor is anything written to the document. Only the link text is returned to the caller.

Is my understanding correct so far?
Is the return format the format of the renderer (ODT XML code in my case) or should it be HTML?
For what reason is the link/text returned to the caller?

I read in the issue tracker it is required for the data plugin.
I had a quick unsuccesfull look and then decided it's better to write this mail than working into it (I do not use the data plugin).

Some advise would be nice.

Best Regards,
Lars (LarsDW223)

--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: