Closed jajouka79 closed 6 years ago
Hi @jajouka79, welcome to the project! If you want to create a fallback template you're probably going to want to setup a route for something like post/:slug
which will allow you to create a generic Vue template for displaying your posts. I would ignore the example I have in the routes, I'll update it soon.
hi. ive just got back onto this project and checked out your suggestion, i can't get it to work, here's the routes in index.js:
routes: [
{
path: '/',
name: 'Home',
component: Home
},
{
path: '/about',
name: 'About',
component: About,
props: { pageContentID: 16 }
},
{
path: 'post/:slug',
name: 'Post',
component: Post
}
],
btw i have a file Post.vue included in index.js:
import Post from '../components/Post'
app.js is compiled correctly
i understand that in router/index.js you can link a wp page by id to a vue component, i have 2 routes set up like this -
and my-url.local/about works fine
however when a wordpress administrator is adding new pages there is no fallback templates, in regular wordpress those would be page.php, post.php etc.
how can I add these fallback view templates or are they already there and I haven't found them yet?