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.

json

how to use a custom page with out anything so I can render json?

Tagged:

Comments

  • Can you please be a bit more specific? What do you mean by "without anything"?

  • x00x00 MVP
    edited November 2012

    You can do but it is kind of pointless trying to suppress the functionality of something that isn't designed for what you want, considering you could do it via a normal hooks in a custom pluign or theme hook.

    public function PluginController_SomeMethod_Create($Sender){
          die(json_encode($SomeData));
    }
    

    Off course it is better to send the correct headers, and you may wish to make use of the frameworks DeliveryType, and DeliveryMethod system which can also use the restful api convention .json . But I'm not goign to do everything for you.

    grep is your friend.

  • What I ended up doing was overwriting my theme to accept a json parameter that displayed with out any mark up except calling the content function. Very useful and quick.

Sign In or Register to comment.