win123139 I want to make a wizard to migrate data in admin page but I don’t know how to load view , css, js …. in extension. A controller can return code but cannot find view , layout ….
ryanmitchell I made a basic extension you can use as a boilerplate/scaffold - https://github.com/ryanmitchell/ti-ext-scaffold - that should give you guidance on that
win123139 ryanmitchell sorry but i get empty page . i can not see any error why ? if i return view it get error 500
ryanmitchell Look at the controllers in the extension. The admin controllers assume the views have the same name as the route.
win123139 ryanmitchell okay, I find out the path . but when I return the view (return view(‘test/index’); ) . It only has the raw view basic html without the admin layout . How can I return view partial with layout , CSS, and js? I just want a new page to still have a layout of admin and add some more my css . Sorry for my bad English
ryanmitchell You need to extend admin controller - see controllers/Test.php In the scaffold extansion
win123139 ryanmitchell i did . but like i said it’s return basic view only https://photos.app.goo.gl/MH2rPpxYvZRnBaaR7
ryanmitchell Don’t return view. The admin controller looks for a view with the same name as the method (index). You can adding vars to the view by using $this->vars[‘x’] = y; Its all there in scaffold 🙂