1. 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

Discussion in 'XenForo Development Discussions' started by attemis, Jan 21, 2014.

  1. attemis

    attemis Member

    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
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    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?
     
    attemis likes this.
  3. attemis

    attemis Member

    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
     

Share This Page