Questions tagged [statamic]

Statamic is a flat-file CMS that supports Markdown and Textile.

Statamic Website - http://statamic.com/

Statamic Support Forums - https://lodge.statamic.com/

Statamic Blog - http://statamic.com/blog

48 questions
14
votes
1 answer

Service worker fetch event is not firing

I have a website and I installed a service worker at the root and even set the scope to '/' as mentioned here: Service worker is caching files but fetch event is never fired But, the fetch event is not firing. Any help is…
Raul Lukacs
  • 165
  • 2
  • 8
4
votes
1 answer

Using Statamic Partial Variables within Entries Tags?

Trying to use partials in the Statamic CMS to keep some content areas as DRY as possible. According to the documentation, I can pass variables to a partial like so: {{ theme:partial src="sidebar" my_count="2" }} In my partials/sidebar template, I…
Brooks Seymore
  • 306
  • 2
  • 13
3
votes
1 answer

Axios params not appending correctly to URL

I'm trying to use params for a post request using Axios. However, when I check the XHR in Chrome, the params don't seem to be appended to the URL. If I do this, it works: axios.post('/!/Like/like?id=' + this.id + '&_token=' + this.csrf_token) But…
Chris Burton
  • 1,195
  • 6
  • 19
  • 54
2
votes
1 answer

How to use blocks and if statement in statamic

I'm trying to use blocks with if statement inside but when I use {{ if }} condition everything outside of it is shown double content example: {{ blocks }} ... more code and 2 more IFs above {{ if set == "hero-1" }}
ggoran
  • 630
  • 2
  • 12
  • 29
1
vote
0 answers

AlpineJs data in a module not working with laravel mix

I have a module named player to re use data for alpine. its giving me Alpine Expression Error: player is not defined. I have tried to remove defer from app.js script tag and moved it from to footer but no effect. I checked in webpack output…
Saqueib
  • 3,484
  • 3
  • 33
  • 56
1
vote
1 answer

How to list only entries using search result in statamic v3

I want to make a search page and it should list entries only in statamic. My code is {{ search:results index="default" }} {{ if no_results }}

No results found for {{ get:q }}.

{{ else }}
Naveen Nayak
  • 175
  • 1
  • 1
  • 11
1
vote
1 answer

iconv() error when running Statamic (Laravel) SEO Pro plugin with php:fpm-alpine docker image

When using Statamic 3.2 / Laravel 8 and the Statamic SEO Pro 2.3 plugin, I am getting the following error on ever page of the site: iconv(): Wrong encoding, conversion from "UTF-8" to "UTF-8//IGNORE" is not allowed My environment…
Joseph
  • 2,737
  • 1
  • 30
  • 56
1
vote
0 answers

Using Statamic with Laravel breeze ui auth doesn't log me, but save in the database

I have a problem with laravel 8.55 and using Statamic 3. I just did fresh install on breeze and when I try to register, it saves the name, email and password in the users table, but doesnt save remember_token and doesnt log me in the system. When I…
JustInCase
  • 41
  • 3
1
vote
0 answers

from:segment_1 statement in nav loop delivers wrong results

While building a navigation like in https://www.youtube.com/watch?v=POgIsLeWGGQ I'm coming across a behaviour I don't understand. My pages tree look like this: I have the following code for the second level navigation: { nav:collection:pages…
Mista K.
  • 105
  • 9
1
vote
2 answers

Load different element or background image on mobile vs desktop

I am working on a website (with Statamic v3 which uses Antlers, Bootstrap, SCSS) which involves different uploads for mobile and desktop backgrounds (inline styling). What is the best way to do this? I am struggling quite a while with these kind of…
1
vote
1 answer

SwiperJS lazy loading - Image not displaying when using data-src as the guide says

I have been struggeling trying to implement SwiperJS to my Statamic 3 project. I have a working carousel/slider that when not using data-src and lazy loading works perfectly fine. But as soon as I try to implement lazy loading following the guide on…
Granny
  • 783
  • 11
  • 22
1
vote
1 answer

Statamic - How can I access assets and single assets with attributes?

In statamic, I have a container with images defined, and attributes set on those images. I then save a single asset page variable in page/index.md photo: assets/main/image.jpg I can use the method below, but only if I create a single image fieldset…
Nikki
  • 336
  • 3
  • 13
1
vote
2 answers

How can I associate file uploads with a form submission that has not yet been created?

I'm building a traditional server-rendered HTML application (using Statamic on top of PHP) that lets users create ideas. They visit a Create Idea form, fill out some questions, and click submit. Once they do so, the form sends a POST request to the…
mpavey
  • 383
  • 3
  • 12
1
vote
0 answers

Statamic URL query string

I'm trying to use htaccess to rewrite example.com/data to example.com/index.php?section=data. I'm using Statamic which seems to make things a bit more complicated. I get a 404 when using the below htaccess, what do I do wrong? If I change…
gustavhmr
  • 11
  • 1
1
vote
1 answer

Nginx: Multiple PHP sites in sub-directories

I've been pulling my hair out for hours now. My [statamic CMS] sites are running in subdirectories on a staging server. domain.com/site1/ domain.com/site2/ domain.com/site3/ I'm using and NGINX conf provided by…
lkemitchll
  • 2,751
  • 2
  • 15
  • 16
1
2 3 4