XF 2.2 How to make sure pagination stays within the parent template

CStrategies

Member
Not really sure how to phrase this, so I'll give an example.

If you're viewing a member's profile you will see the member wrapper with the user icon and banner, etc, and you'll see the tabs, such as Profile Posts. If they have a lot of profile posts, and you click "Next" on the pagination, "page 2" of the Profile Posts will still be under the "Profile Posts" tab, under the wrapper with the user icon and banner, etc.

What is the trick/key to making sure hitting "next" loads the results under the correct tab, under the member header? When I've tried to add pagination under a tab, when you hit next it displays the results as if they're on a new page, minus the wrapper.
 
If this interests anyone else, Update: I gave up on it.

XF does have some built-in JS for making templates appear in a pane. For example the tabs tab class, as well as the tabpanel role. However, I couldn't get this to work with pagination. I thought "Profile Posts" would be a good example since it has pagination, but as it turns out, it leverages the View method for the member_view template (which will always show the member header) so that doesn't help with custom tabs.

I ended up just writing my own JS and using ajax to load templates wherever I needed, which is fine. I had just hoped there was a more straightforward built-in way to do it.
 
Back
Top Bottom