XF 2.1 Xenforo Framework Questions

RisteDimitrievski

Active member
For creating addons where:

  • Are placed addon templates, where to create and what function to use to render the view template
  • Are placed addon controllers
  • Are placed addon models

your development faq on the site are missing informations... And is not a complete docs in xenforo framework.
 
  • Are placed addon templates, where to create and what function to use to render the view template
Templates are located in the database, you can create them in the admin backend or as template.html in _output/templates within your Add-on folder.
Templates are usually called from the controller actions via
PHP:
return $this->view('YourAddon:ViewClass', 'template_name', $params);
  • Are placed addon controllers
In Pub/Controller within your Add-on folder.
  • Are placed addon models
Entities are located in Entity within your Add-on folder.
your development faq on the site are missing informations...
It is not as complete as it could be, but if you've followed the example Add-on this really should be enough to get you started.
 
Read the developer documentation, more precisely the article about Entities, Finders and Repositories which are the classes that replaced the concept of models in XF2

Not clearly written. I was meaning creating custom templates e.x for form submits in backend site (Admin Panel), and how to implement it in addon controller

They're just mentioning extending not creating templates..
 
Not clearly written. I was meaning creating custom templates e.x for form submits in backend site (Admin Panel), and how to implement it in addon controller

They're just mentioning extending not creating templates..

You can follow the Let's build an add-on tutorial which will explain pretty much everything you need to know. And If you can't get around some problem, feel free to ask here o, better yet, try to read some of the XenForo code and see how they do something that you want to replicate.

I know the concepts might seem a little bit confusing but they make sense once you start playing with the code.

Best of luck fellow developer!
 
I'm trying to save data from form, and im confused what's wrong.

EDIT: Figured out about this problem.

Now what function to use to redirect back after successfully submitting the form.
 
Last edited:
Back
Top Bottom