• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to add a page to the user preferences thingy?

Liam W

Well-known member
#1
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?
 

Jeremy

Well-known member
#2
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.
 

Liam W

Well-known member
#3
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?
 

James

Well-known member
#5
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.
 

Liam W

Well-known member
#6
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...
 

Liam W

Well-known member
#9
Last edited:

xf_phantom

Well-known member
#11
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
 

Liam W

Well-known member
#12
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)
 

xf_phantom

Well-known member
#15
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: