Search

Showing 7 of 1,975 result(s)

/blog/2022/11/01/a-beginners-guide-to-antlers-arrays-and-loops#content-looping-keyvalue-pairs

In the previous section, we learned that creating a tag pair from an associative array or YAML map will extract the nested key/value pairs into new variables. However, there are times when it is desirable to loop over an associative array and...

/blog/2023/09/03/creating-a-hybrid-cache-system-for-statamic-part-five#content-invalidating-labels-using-event-listeners

…the process of invalidating them using new event listeners. We'll be listening for the following events, all of which are triggered by Statamic's Control Panel: Statamic\Events\EntryCreated, : Triggered when a new entry (like a blog post or an...

/blog/2023/04/10/creating-a-custom-statamic-layout-tag#content-scaffolding-our-layout-tag

Now that we have most of our boilerplate out of the way and our addon's dependencies have been installed, we need to start thinking of how we will implement our custom layout Tag. Ideally, we should be able to write Antlers code similar to the...

/tidal-starter-kit/v1/managing-projects-and-versions#content-creating-versions

…-------------+--------+ 11 12 What is the name of the new version?: 13 > The next prompt is "What is the name of the new version?". A version name is displayed on the site in the version selection, in the case of multiple versions. The version...

/blog/2023/04/10/creating-a-custom-statamic-layout-tag#content-implementing-our-layout-tag

Let's add properties and methods to our Layout tag inside src/Tags/Layout.php and work through what each part is doing. First, the public methods, index and wildcard , are how we will interact with our custom Tag within an Antlers template. If we...

/blog/2021/09/12/creating-a-customized-statamic-3-500-error-page#content-creating-a-custom-tag-to-help-test-our-error-page

…e Tags directory will be created if it does not already exist). The command accepts the name of our new tag; in the following example ServerError is the name of our new Antlers tag (make sure to run this command from project's root directory,...

/blog/2023/04/11/creating-a-simple-honeypot-field-in-laravel#content-creating-our-middleware

Our first example will be to create our middleware to check for the presence and value of the honeypot field. If the honeypot field is not empty, the middleware will block the request and return a 403 Forbidden response. Depending on your...