Questions tagged [vue]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
32 views

Extract Craft CMS data to Vue component

I want to extract data from Craft to a Vue component. I create a vue component like this: {% set entry = craft.entries.section('homepage').first() %} <template> <h1>{{entry}}</h1>...
1
vote
1answer
47 views

Setting up VueJS in a Craft CMS Project

Trying to better my skills and take a simple Craft-driven website to a more modern level with some VueJS. I'm still very much learning Vue. The course I've been following recommends using vue-cli to ...
0
votes
0answers
35 views

CraftCMS + GraphQL - orderBy Random?

I'm currently building my first JAM stack app using Nuxt as my front-end framework and Craft as my headless CMS. I'm leveraging Apollo as my GraphQL interface client. I have it pulling data back just ...
1
vote
1answer
43 views

getting active userid by GraphQL?

I build a SPA with Craft CMS and Vue. I use Vue Router and have three Props. Here is my current router-view: <router-view csrfName="{{craft.app.config.general.csrfTokenName}}" csrfToken="{{...
1
vote
1answer
253 views

How save data from form in headless Craft via Vue.js

I have front-end form on Vue.js and Craft CMS for the backend. I need form. And I want to save data from the form in Craft CMS. How to save data from user frontend to backend on Craft CMS?
0
votes
0answers
25 views

Element Api: Create list of sites

I'm trying to provide a list of sites in a multisite environment as a JSON Feed for a Vue component. My current solution is to loop through the sites in the template with twig and pass it back to ...
1
vote
0answers
108 views

Entries as JSON files?

I work with VUE CLI and I want to build a entry form. My first Idea to bind in the data was props. They work but i can't modify the data (because it's props :D). To correctly integrate the data, my ...
1
vote
1answer
70 views

Logging in to Craft via Vue/Javascript apps

I'm just diving into the world of javascript frameworks (late to the party I know) and can't figure out the missing piece of the authentication puzzle. What is the preferred way to authenticate users ...
0
votes
0answers
274 views

Vue + Apollo + CraftQL

I'm starting to dive deeper w/Vue + Apollo + CraftQL but I'm not getting any data on my http://localhost:8080/ but it is mostly working on my Laravel Valet host of https://hybridinteractive.test/test....
1
vote
2answers
87 views

Using a Redirect plugin in conjuction with a wildcard route

I have Craft set up to serve a single page Vue App (vue-cli) for all routes it can't match in the sections. return [ '<url:(?!api).*>' => ['template' => 'index'], ]; This works ...
1
vote
1answer
184 views

FreeForm and Vue - Hidden Forms in Modal - Manually refresh the Craft CRSF token and Freeform JS Honeypot field

Anyone using FreeForm and Vue together? I have a form that is hidden away in a modal (that is then shown using Vue) via a click of a button. Vue is only used to hide the form and show the form. the ...
1
vote
1answer
236 views

How to get an element query into json (for vue) without extra data?

Lets say I want to get a list of category names and ids and pass them into JSON (for vue.js). This is how I'm currently doing it: {% set sections = craft.categories.group('teamCategory').select(['...
1
vote
0answers
178 views

How can I edit multiple entries via multiple front-end forms using Vue.js?

I found this post. However, writing a plugin in currently not an option, and I'd like to do this with Vue.js since I'm already using it for form validation & other stuff. Also, this involves ...
2
votes
1answer
3k views

Axios post function got 400 bad request

I created a Vue component. And in this component, I use axios to send post request when it's mounted, CSRF token also included, but still got 400 status. Anyone know why?