Questions tagged [vue]
The vue tag has no usage guidance.
18 questions
0
votes
0
answers
54
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 ...
2
votes
1
answer
249
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 ...
0
votes
0
answers
692
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
1
answer
125
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 ...
1
vote
0
answers
174
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 ...
2
votes
2
answers
293
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 ...
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 ...
0
votes
0
answers
353
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
1
answer
844
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 ...
1
vote
1
answer
452
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
1
answer
894
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?
1
vote
0
answers
336
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 ...
2
votes
1
answer
306
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 ...
1
vote
2
answers
256
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
1
answer
362
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
1
answer
453
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
0
answers
450
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
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?