You will need to make following changes to your F7 core app, so that all its routes can be accessed by directly entering the url in browser address bar.
1. Set Base URL in index.html
Open index.html and add <base href="ROOT_DIRECTORY_OF_YOUR_HOSTED_F7_PROJECT" /> element in the <head>
Suppose your project path is /htdocs/myproject/ , then you must set <base href="/myproject/" />. If your project is located in root directory then set <base href="." />
2. Set Following Parameters While Initializing F7 Main View
OMg! it worked! ive been looking for this for a long time huhuhu
thank you so much… but there is just a slight problem . im using tabbed template… and the problem is… the tab is not active when i clicked catalog or setting. the highlist stays only on home button. how to tweak this. please see attacjed. I really appreciate it. it is means a lot to me.
Could you please host your project on a live server and provide me the url? I will need to check how you have structured the tabbed views in your app. This would help me to provide you the solution.
I have checked the structure of your app shell, ie, index.html. At present you’re using multi-views layout, ie, each tab acts as a separate view which includes main view as well. But according to F7 official docs, pushState (browser history, pretty urls) works only for the main view. Therefore we will need to re-structure the layout of the app such that we will use single view layout along with the routable tabs. This will solve your issue.
If you agree, let me know, so that I can rewrite the code structure for you.
hmm… I see. changing the layout structure would be a huge adjustment for me. I dont really follow much on the official doc. as long as it is working, that is fine with me. in fact, all the codes are happening in app.js i dont use the typescript style of coding. just really an old school jquery-ish style of coding.
Good to know that you have come up with the workaround.
I checked your app in the JS console and found that all your pages are opening in the main view only, making other views useless. It would be better if you use routable tabs instead of multiple views for your use case (ie, pretty urls).
You won’t have to make huge adjustments for that. It only requires a minor change in routes.js (for loading routes in routable tabs) and a small change in index.html. Other than that everything will be as it is.
And of course, I will do it for FREE I will be very happy to help you.
awww thank you so much! id be so grateful. Yeah, im not gonna lie, other views became useless. but im afraid that if i remove other views, the site might not gonna work. i dont have full understanding of concept of pages and views. my one brain cell cant handle it hahaha.
OK, let’s try that’s minor changes that you are suggesting. ill do my best to study it.
im not an expert haha… just a know-how person XD