Returning a json response as view

Status
This content is read-only, or is not open for further replies.

Orit

Guest
offline
Hi
Using XF2.2
I am displaying a snippet of a post, and have a button under it.
after clicking the button (to display the entire post, on the same page), I'd like to increment the views as if the post was viewed on its own page.
I have a public controller, but can't figure out what type of view to return.

Checking the route itself, when setting:
PHP:

Code:
$reply = $this->view('', '', [
    'post_id' => 'none' //this is for checking the controller page
])...

Read more

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom