Skip to main content

Questions tagged [javascript]

0 votes
1 answer
258 views

I'm having trouble fetching data in a new Next.js app from Craft. I'm on Next 15.0.3 and Craft 5.5. I've got CRAFT_CMS_GRAPHQL_TOKEN and CRAFT_CMS_GRAPHQL_ENDPOINT set up in my .env file. I've got '...
Tyssen's user avatar
  • 665
0 votes
2 answers
221 views

I'm working with Craft CMS 5 using a local environment configured through DDEV, which defaults to NGINX. I typically work with Apache, so I've been adjusting my caching rules for NGINX to ensure ...
Romain P.'s user avatar
  • 1,927
2 votes
1 answer
204 views

I have a Craft CMS 4 with forms for logged-in users. Some users may keep certain pages open in their browsers. Sometimes, users submit the form while their session has expired (after one hour, in this ...
Romain P.'s user avatar
  • 1,927
0 votes
0 answers
107 views

I'm working with a template in Craft 2, and in referencing Twig variables in the Javascript, they are not recognized when the page is previewed. I get a Template Error - Variable x does not exist ...
buck1112's user avatar
  • 420
1 vote
2 answers
453 views

I'm working on a template in Craft 2, and I have a number of divs which are part of a Javascript "read more" script, which automatically shortens the visible text at a set number of ...
buck1112's user avatar
  • 420
1 vote
1 answer
246 views

I'm trying to track some link clicks on a website that is using Craft CMS. I only have access to the Website and the Data Studio Report, but I don't have access to Google Analytics, GTM or any "...
SayMyName's user avatar
1 vote
3 answers
424 views

I have a similar question here. But I was NOT able to ask the right question. I'm practicing with starter-blog template. How do I use page specific javascript using the asset rev plugin and webpack? I ...
user's user avatar
  • 63
1 vote
1 answer
69 views

I'm practicing with starter-blog template. How do I include a page specific javascript using the asset rev plugin? Thanks.
user's user avatar
  • 63
2 votes
1 answer
1k views

How can I display an entry string, with included special characters (like single and double quotes) , inside a script tag without translating these special characters into html entities but escaping ...
Samuel's user avatar
  • 69
2 votes
2 answers
217 views

I've built three buttons with checkbox dropdowns that display categories that filter the content below based on categories. I am currently using the relatedTo function to only display the categories ...
Elektra Murphy's user avatar
2 votes
1 answer
590 views

I'm able to call my controller action directly from a url in the browser and get the proper response but when I call it from a page with js I get a 404 error. I'm working off the solution found here ...
Ryan Sneesby's user avatar
1 vote
1 answer
342 views

I'm working on a kiosk-type plugin which will cycle through all news entries, beginning upon template (or page) load. It needs to load a JavaScript ajax script for this on page/template load. Would ...
buck1112's user avatar
  • 420
1 vote
1 answer
97 views

I currently have price, sku and variant title swapping when clicking between variants on a products details page. This works with AlpineJS and looks something this. https://codepen.io/amasci/pen/...
Terry Upton's user avatar
  • 1,896
2 votes
1 answer
823 views

I've got Sprig set up to filter entries by a few categories. I'm trying to re-layout Masonry JS after this update takes place. For starters, I add Masonry to the window variable (defined as global in ...
Bryce's user avatar
  • 251

15 30 50 per page
1
2 3 4 5
9