Skip to main content

Questions tagged [vue]

The tag has no usage guidance.

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

twig how to include a twig in an existing div

My project now contain many twig and vue file, and I want to add a footer in every page. Every twig file will {% extends '_base/index.twig' %} so I want to include footer.twig in index.twig so that ...
LJ27's user avatar
  • 1
2 votes
1 answer
191 views

How to use ajax call to retrieve data from craft cms entries to use in php application

I'm building a static webpage with php and Javascript. I have setup all my data in craft cms entries. I want to use ajax to retrieve the data from craft and just display it on my webpage. How do I do ...
Alyx's user avatar
  • 23
1 vote
1 answer
114 views

Freeform to show via Vue Js

I have 3 freeforms - form 1, form 2 and form 3. I want a select option on which I click and the necessary form opens as per the selection. Can I render the Freeform which are build using VUE js Select ...
Priti Rathod's user avatar
1 vote
0 answers
164 views

Add custom fields to the cart line items in Craft Commerce 3

I have a product variants with the custom field for the variant image. In a cart overview I need to show an image of added line item (image should be of the added product variant if there are variants ...
Alex89's user avatar
  • 183
2 votes
2 answers
277 views

Getting a new cart after adding the product in decoupled frontend

I'm using the headless Craft together with decoupled frontend on Nuxt.js. I have to implement Craft Commerce 3 cart logic on the frontend, for that purpose I'm using graphQl/axios requests. However ...
Alex89's user avatar
  • 183
0 votes
0 answers
324 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>...
Cosmin Ciolacu's user avatar
1 vote
1 answer
802 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 ...
revlis's user avatar
  • 328
2 votes
1 answer
1k 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 ...
Rob Erskine's user avatar
1 vote
1 answer
421 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="{{...
Peter L's user avatar
  • 86
1 vote
0 answers
323 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 ...
Markus's user avatar
  • 11
2 votes
1 answer
298 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 ...
dmatthams's user avatar
  • 2,492
1 vote
1 answer
885 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?
Людмила Петчик's user avatar
0 votes
0 answers
671 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....
Mark Busnelli Jr's user avatar
1 vote
2 answers
237 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 ...
Hyra's user avatar
  • 123
1 vote
1 answer
351 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 ...
Terry Upton's user avatar
  • 1,894
1 vote
1 answer
420 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(['...
sunscreem's user avatar
  • 153
1 vote
0 answers
430 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 ...
Andrea DeMers's user avatar
2 votes
1 answer
5k 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?
yu xia's user avatar
  • 397