📢 Moderators Needed 🚀

Moderators are needed with resources to post or have access to resources to post. Submit an application to be considered.
O

RSS Returning a json response as view

O

Orit

Guest
Guest or Bot
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...
 
Similar content Most view View more
Back
Top