I got the following setup in pages
/pages/index.vue
/pages/_blog
/pages/_blog/index.vue
/pages/_portfolio/
/pages/_portfolio/index.vue
The blog and portfolio are dynamic as the user the CMS should be able to change them for example make portfolio to myportfolio
So I link in nuxt as follow
<nuxt-link :to="{name: portfolio, params: {portfolio: 'myportfolio'}">portfolio</nuxt-link>
So far so good! When clicking on the link you will go to the portfolio and it wil use the page portfolio component.
However when I refresh/reload. I'll get the page blog component. Hence when reloading the param is not passed and so it does not know what page component it should us. I guess it takes the first it finds in this case the blog component.
I don't find any documentation how to handle this. If the structure would be more simple example
/pages/index.vue
/pages/blog/index.vue
/page/portfolio/_slug.vue
Then it kind of simpler. As the params will be a the slug and component always portfolio. But in my case the subroot components are already dynamic.
So my question. How do make NUXT understand that in case of http://localhost:3000/myportfolio/ the component portfolio should be used. I can determine from my Wagtail api the type of page, slug, id etc... So this should not pose a problem. But to do this I need first to have the correct component.
thx in advance for help!