I figured it out myself. For correct work, parse() should be used. If
you want to use your tag in templates, don't forget to add
replaceVariables:

   static public function addGetParameters($input, array $args, Parser
$parser, PPFrame $frame) {

         if (!isset($args['property']))
             return $input;

        $input = $parser->replaceVariables($input,$frame);
        $parser1 = new Parser();
         /**
          * @var ParserOutput
          */

         $output = $parser1->parse($input, $frame->getTitle(),
$parser->getOptions(), true, true, null);
//.... the rest is the logic of my extension
-----
Yury Katkov, WikiVote



On Mon, Jul 1, 2013 at 10:49 AM, Yury Katkov <katkov.ju...@gmail.com> wrote:
> Hi everyone!
>
> So I have the following string:
> "[[propname::foo]],[[propname2::bar]]]"
>
> I want to turn it into HTML <a> tags.
> I'm now sitting inside parser hook and struggling with
> recursiveTagParse() and parse() functions but without an efect:
> ...
> $parser->setHook( 'backlinktags', 'WikivoteBacklinkTags::addGetParameters' );
> ...
>
> static public function addGetParameters($input, array $args, Parser
> $parser, PPFrame $frame) {
>   $str = "[[propname::foo]],[[propname2::bar]]]";
>    $output = recursiveTagParse($str, $frame); // $output="," and that's bad
> }
>
> Any ideas on how to parse my string into html?
>
> -----
> Yury Katkov, WikiVote

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to