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

Display a other template on a other subroute

#1
Hello,
im new in xenforo development and im currently creating an additional page system for my forum.
But i have a question, how does it work that i display on the route /test/about/ an template called myaddon_about and on the route /test/ the template myaddon_index?
I googled so much but i found nothing...
Maybe i googled the wrong thing.
attemis
 

Jeremy

Well-known member
#2
Your controller defines what templates to show. Specifically, the route /test/ hits your controller's actionIndex() function. /test/about hits your controller's actionAbout() function. In the return of the functions, you define the view that you want to display. Have you poked around any of the default controllers?
 
#3
Ah i understand :)
That is what i search thanks!
And yes i took a look in xenforo's page system because i thing thats quite similar to my problem