How to add a page to the user preferences thingy?

Liam W

in memoriam 1998-2020
How would you add a page to the /account section?

Namely, how would you add your page to the /account navigation, and link to it from the drop down tab?
 
You extend the controller to add your action. And in 1.1, use template hooks to extend and add in your links, in 1.2, use the new template modifications to include your links.
 
You extend the controller to add your action. And in 1.1, use template hooks to extend and add in your links, in 1.2, use the new template modifications to include your links.

Can I still do it with an existing controller and template? Can I add the sidebar to a template?
 
Can I still do it with an existing controller and template? Can I add the sidebar to a template?

Extend XenForo/ControllerPublic/Account (******** my underscore not working), add your new actionMyNewPage() and then do what you wish to do in that action.
 
Extend XenForo/ControllerPublic/Account (******** my underscore not working), add your new actionMyNewPage() and then do what you wish to do in that action.

But I already have a controller with a page that does everything, I just want to make it an account page and not a standalone page...
 
Last edited:
no, just a joke

as said already =>
PHP:
YourController extends the proxy of XenForo_ControllerPublic_Account{

//your actions
}
use $this->_getWrapper for the return and add the links to the sidebar via the template change/merge/modification system
 
Right, but if I try and do /account/macros/1/edit (the one is data passed in), or /account/macros/save then it say's can't find action 'macros1edit' or so on - that isn't the action...

(And I thought you were being serious, I only got your original reply in the email :P)
 
Did you delete your post @xf_phantom? I got an email about it...

I guess I'll just use it as it is now then...

Liam
yes i deleted it

i would just use a own route prefix because it's the fastest way
adding something to the account route would require using a proxy class to extend the account route and and and....

trust me, it's not worth to do this! just use a own routeprefix

maybe it's possible in 1.2 with the new changes, but i have no idea:(
 
Last edited:
Top Bottom