XF 2.2 Widget only addon

Dannymh

Active member
Hi,

I am in the process of porting over some things I had previously written from 1.x. One of the things I had was a widget which retrieved data from the database and you can page through information. This is basically a "match draw" which pages through the games.

The data that is shown is not available in any other part of the site, just the widget and I am wondering whether I need to go to the bother of writing a full controller etc or whether I can just use the widget, does the widget then also have a URL endpoint that I can AJAX post to?

Cheers
Dan
 
I am wondering whether I need to go to the bother of writing a full controller etc or whether I can just use the widget, does the widget then also have a URL endpoint that I can AJAX post to?
No that's not something we expose but that doesn't necessarily mean you have to write your own controller.

XF does have a Misc controller which we use basically for things that we can't be bothered to write a full controller for ;)

So you could create a class extension of XF\Pub\Controller\Misc and add your own action to that existing controller. Just at least try and prefix the action name so it's unlikely to clash with anyone else doing a similar thing.
 
No that's not something we expose but that doesn't necessarily mean you have to write your own controller.

XF does have a Misc controller which we use basically for things that we can't be bothered to write a full controller for ;)

So you could create a class extension of XF\Pub\Controller\Misc and add your own action to that existing controller. Just at least try and prefix the action name so it's unlikely to clash with anyone else doing a similar thing.
Is "I love you" too strong?

Thanks mate, this may just work. I might use this just to launch and build later, I can see scope of building this out with more detail and its own pages/controller later but I have less than a week to get this converted over.

Thanks again
 
Back
Top Bottom