I’m building a simple plugin, in which i reference other pages on my Website.
This is the blueprint:
products:
type: pages
label: Product
query: site.index.children.template(“product”)
In php i would just create a page object by going $referencedPage = $product->toPage()
How can i do the same thing with Vue for the panel viel/preview?
product: {
template: `
<div v-if="content.products.length < 1" class="placeholder">Enter products ...</div>
<div v-else class="products">
<div v-for="(product, index) in content.products" :key="index" class="product">
{{ product.text }} // how can i product->toPage() here??
</div>
</div>
`
},
Is this even a meaningful approach to achieve this?
Thank you!