I created a app using this start repo https://github.com/yogiben/meteor-starter
Everything is working fine on desktop but when I check with browser-sync on my ipad I get the error:
Couldn’t find a template named “homeLayout” or “homeLayout”. Are you sure you defined it?
I read around a lot on stackoverflow and found several people complaining of the same issue, but none of them had it just for a specific device and so their fixes have not been applicable to my problem.
The layout is definately there and working fine on the desktop version. I have tried browser-sync with various other starter packs for meteor and had no problems.
Any advise is greatly appreciated. Thanks
Use Flowrouter, ironrouter is bugy in several usecases.
Flowrouter is the recomended router from the mdg
@tomtom87 Did you call it really “homeLayout” or is it’s name home_layout? In case of underlines, you need to define
template:‘home_layout’ in your route.
Yes, but in some cases FlowRouter isn’t a good choice, f.e. for multilingual applications. There is only a i18n-router package for Iron:Router, but not any for FlowRouter.
you can use the tap:i18n package, that works great. when you need a DB for the i18n part you can use tap:i18n-db package
Iron Router is in the most usecases the wrong choice.
In the early stage of meteor was iron router that thing, but now is flow router the best thing for routing, for templating you can use BlazeLayout or ReactLayout in combination with FlowRouter
Look into the Meteor Guide
@norBu I don’t mean the normally i18n package, I’m talking about the i18n-router package, which registers automatically routes like “myapp.com/de”, “myapp.com/es” and handles all translations things automatically. So you have your normal templates and every language strings will be automatically replaced with the requested language.
I know that FlowRouter is the recommended way, but for some “bigger apps” such a missing feature is a no go, especially when MDG tries to be attractive to enterprise customers. But yeah, I think FlowRouter will get more attractive packages in the following 1-2 years, but at the moment I’ve to think about which router is the best for my needs.
Honestly, just use flowrouter. Iron router had definitely has some buggy behavior.
Thanks for the help everyone I think I will go for FlowRouter and go
about the i18n another way…
@Dennis it is called homeLayout and loads fine on the desktop version of
the site, only the ipad version fails with this template error. The file
exists and is working on desktop perfectly. Cannot fault it. Just mobile is
broken. so odd right?
Thanks again guys
I recommend the tap:i18n package. It has worked extremely well for me.
Thank you Wesley, I’m going to give that a go next time I’m on this project.