XF 2.0 List nodes in an add on's option page


New member
I want to allow an admin to select which forums/nodes on their site that they wish the add on to be applied to. I believe this should live in the add on's options page. I would really like to have a list of nodes with a checkbox next to each one that an admin can check. I'm unclear on how to add such an option.

Alternatively could I modify the template for the "Nodes" page and add the checkbox there?

What is the most conventional approach to this?

Pointing me to relevant documentation is very welcome.

Thank you

Adam Levy
Options support PHP callbacks for this sort of thing. Out of the box, there is \XF\Option\Forum::renderSelect() and \XF\Option\Forum::renderSelectMultiple() but I think they will only allow for the selection of forum nodes. You can have a look at that class to get an idea for how to build your own.
Top Bottom