Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Plugin template Render as String

I have a question,
how can и Render Plugin Template in the Plugin without Мasterview as String and then pass both "echo "

example:
$templateString = $Sender->Render($this->GetView(test.php));
echo templateString ;

thank you in advance

###### German

Ich habe eine Frage,
wie kann ein Plugin Template rendern ohne Мasterview und als String an Echo übergeben

Beispiel:
$ templateString = $ Sender- > Render ( $ this-> GetView ( test.php ));
echo templateString ;

danke im Voraus

Comments

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Maybe simply with an include...

    ob_start();
    include(__dir__.DS.'views'.DS.'test.php');
    $output = ob_get_clean();
    echo $output;
    
  • Options

    Thanks

    And with SetData() ? Possible ?

  • Options
    hgtonighthgtonight ∞ · New Moderator

    Set the delivery type to view and use PHPs output buffering. E.g.:

    $sender->DeliveryType(DELIVERY_TYPE_VIEW);
    ob_start();
    $sender->Render($this->GetView('test.php'));
    $string = ob_get_flush();
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options

    Thanks OneMore,
    Bat the Base_Render_Before run 2 once

    TiA

  • Options
    gnem40gnem40 New
    edited January 2016
    $sender->DeliveryType(DELIVERY_TYPE_VIEW);
    ob_start();
    $sender->Render($this->GetView('test.php'));
    $string = ob_get_flush();
    

    Sender->DeliveryType(DELIVERY_TYPE_ALL);

    works like this, but the menu is created double, the menu items are all double.
    can someone faced such problem.

    thanks in advance

    p.s i spеак German better.

Sign In or Register to comment.