Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

json

This discussion is related to the Custom Pages addon.

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

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.