1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Controller response as JSON

Discussion in 'XenForo Development Discussions' started by digitalpoint, Nov 7, 2011.

  1. digitalpoint

    digitalpoint Well-Known Member

    So I know I can set the response type to JSON, and I do get JSON output, but is there a way to output the params you pass to it? I feel like it's something simple, but the following doesn't work:
    $this->responseView('XenForo_ViewPublic_DraggableThreads_Move''foo', array('digitalpoint_test' => 'hello world!'));
    I get JSON output, but I what I'm trying to do is include "digitalpoint_test" in the JSON array.
  2. Fuhrmann

    Fuhrmann Well-Known Member

    Have you tried to include "digitalpoint_test" in the ViewPublic?
    digitalpoint likes this.
  3. digitalpoint

    digitalpoint Well-Known Member

    That is exactly what I was missing... tyvm
    Fuhrmann likes this.

Share This Page