The todos app implements useraccounts with the following structure and files:
imports/startup/client/useraccounts-configuration.js contains the AccountsTemplates.configure() code.
imports/startup/client/routes.js contains the AccountsTemplates.configureRoute() code.
However the routes.js file also does an import of another .js file that has code to override the built-in accounts templates. When I disable the import of this code, the built-in templates do not appear.
So how can I use the built-in useraccounts templates? Do I need to import something?
The Users and Accounts section of the Meteor Guide describes many things about useraccounts but does not mention anything about how to get it working with the imports directory structure. Maybe it should.
which includes the needed user accounts {{> atForm}} template call. If you want to disable the todos custom user accounts templates for example, just make sure youāre still importing a template that includes the {{> atForm}} call somewhere.
But I donāt want to use the {{> atForm}} template call. I want the built-in atSignIn template loaded in to my App_body template when the /sign-in route is requested.
It worked fine before I had started to transition to the imports directory structure, simply by writing
Okay - makes sense. In that case continuing with the todos example, you would just want to disable the defaultTemplate option in the useraccounts-configuration.js file. Itās currently referencing the Auth_page template which is imported in accounts-templates.js. So make the following changes to get the default
But in my own app the Sign In route is still not found. Strangely, my app doesnāt tell me a āroute not foundā error message but instead shows the loading template for any route that doesnāt exist. I donāt know why it does that.
When I remove the loading template from my app I get the error message in the console No such template: loading.
I worked out why the loading template was being shown. It was because I had made a last-resort route (that I had forgotten about), like FlowRouter.route(ā/:Idā), so that was being loaded when all previously defined routes did not match the requested route. The route is for user-generated content, so that their content can be accessed using a URL.
I disabled that route and now the useraccounts templates show. Now I need to work out how I can re-enable the route whilst still have useraccounts templates working.