{{craftSnippets}}
Home Articles Plugins Starter theme Components on Github Gists About
  • Home
  • Articles

Articles

a month ago

User account management with Craft CMS

Ready-to-use templates and detailed explanation of how they work
#templates
6 months ago

Frontend testing for Craft CMS websites with Codeception and Cypress

Testing a Craft CMS website might be less difficult than you think. Level up and follow us along as we learn about frontend testing Craft CMS websites.
9 months ago

Building reactive Craft Commerce product page with Sprig plugin

Simple product page which allows switching variants content without refreshing the whole page.
#templates #craft commerce
a year ago

Dynamically generated PDF attachments for Freeform submissions

How to attach dynamically generated PDF file to Freeform email submission in Craft CMS
2 years ago

Using template hooks in Craft CMS

Template hooks can be used to inject content into various places of the control panel to enhance its functionality
#modules
2 years ago

Alpine JS modal component for Craft CMS

Content-agnostic and easy to customize modal component made with Alpine JS.
2 years ago

Using template UI elements to extend Craft CMS control panel

Using template UI elements, we can add custom pieces of Twig code to elements pages in the control panel.
2 years ago

Matrix within a Matrix - possible solutions for Craft CMS

How can we use the Matrix field within other Matrix field? This article describes possible solutions to this problem.
2 years ago

Universal email template for Craft CMS

Simple email template built with Twig that can be used for any kind notifications.
#twig
2 years ago

Creating attributes table from entry fields in Craft CMS

When you group fields in matrix block, you can loop through them to automatically create a table containing their values.
#twig component
2 years ago

Namespacing forms in Craft CMS

If you want to use specific HTML form in multiple parts of a single page - to avoid potential problems you need to use "namespace" Twig tag.
#twig
3 years ago

Creating map-based navigation for Craft CMS

Using an SVG map divided by regions, you can create navigation, where each region is a link to an entry.
#twig component
3 years ago

Placeholder image macro for Craft CMS

By using simple Twig macro, you can generate a placeholder image with specific dimensions.
#macro
3 years ago

Building AJAX contact form with Craft CMS

Build AJAX-based contact form using Contact Form plugin for Craft CMS.
#twig component
3 years ago

Using incognito field plugin for Craft CMS

Learn how you can use incognito field plugin in your custom Craft CMS modules.
#plugin
3 years ago

Email footer creator made with Craft CMS

By using just Twig templates, we can create a simple app that generates HTML code from user-provided content.
3 years ago

Infinite scrolling and lazy loading with Craft CMS

Learn how to implement lazy loading and infinite scrolling functionality using Craft CMS Element API plugin.
#twig #javascript
3 years ago

Using Javascript in Twig templates with Craft CMS

Learn how to use Javascript in Twig templates in order to make your code more portable and maintainable.
#twig #tutorial
3 years ago

Twig templating tips and tricks for Craft CMS

Collection of useful tips, tricks and code snippets that will help you with creating better Twig templates.
#tutorial #twig
3 years ago

Basic SEO functionality for Craft CMS

Learn how to set up SEO functionality in Craft CMS - with pure Twig code or using Seomate plugin.
#tutorial
3 years ago

Working with dates in Craft CMS templates

Learn how dates work in Twig, and improve your templates with "time ago" and "default date format" Twig macros.
#macro
3 years ago

Working with SVG images in Craft CMS templates

Learn how to load, process and modify SVG images in Craft CMS templates using Twig macro.
#macro
3 years ago

Responsive and lazy-loaded youtube videos with Craft CMS

In this article, you will learn how to create responsive and lazy-loaded embedded youtube player in Craft CMS templates using Twig macro.
#macro #twig
3 years ago

Debugging and inspecting Twig templates in Craft CMS

Learn about methods to debug and inspect Twig templates in Craft CMS - how do they differ from each other and which one you should use.
#twig
3 years ago

Creating article excerpts with Twig component in Craft CMS

Article excerpts are an integral part of websites like blogs or portals. Learn how to create article excerpts using reusable and robust Twig component.
#twig #components
3 years ago

Adding favicons to Craft CMS website

Learn how to create favicons from images uploaded through Craft CMS control panel or from static images using Twig components.
#twig component
3 years ago

Truncating text with Twig macros in Craft CMS

These Twig macros will allow you to truncate text - by a number of words or number of characters, without splitting words.
#macro
3 years ago

Universal language switcher for Craft CMS

Language switcher is an essential part of every multilingual site. This template component will generate language switcher, along with country flags next to language links.
#twig component
3 years ago

Read time macro for Craft CMS

This macro will return read time in human readable format, adjusted to your site locale.
#macro
3 years ago

Using attr() function to render HTML attributes in Craft CMS

Craft CMS 3.2 introduces new Twig function - attr(). It can be used to render HTML attributes from arrays of data. Learn how to use it to make your templates cleaner and easier to maintain.
3 years ago

Building dynamic, AJAX based pagination for Craft CMS

Learn how to create a dynamic, paginated list of entries that loads content using AJAX - without refreshing page.
#navigation #twig component
3 years ago

How to add Disqus comments to Craft CMS website

In this article, you will learn how to set up Disqus comments on your Craft CMS website - without the use of any plugins.
#twig component
3 years ago

Ellipsis pagination component for Craft CMS

This pagination Twig template component shows only page links close to the currently displayed page - rest of links are replaced with an ellipsis.
#twig component #navigation
3 years ago

Converting email addresses into links using Twig macro

Learn how to turn email addresses in text into "mailto" links that are secured from email harvesting spam bots.
#macro #email
3 years ago

Breadcrumb created from URL for Craft CMS

Breadcrumb component automatically created from URL. Each URL segment is represented by a single breadcrumb link.
#twig component #navigation
4 years ago

Best developer-oriented Craft CMS plugins

Are you Craft developer and you want to make your life easier? Here's a list of best Craft CMS developer-oriented plugins.
#plugins
4 years ago

Search autocomplete component for Craft CMS

Basic search autocomplete component, appending search hints to input. It works out of the box and can be dropped into any Craft project.
#twig component #javascript
4 years ago

RSS feed - template component for Craft CMS

This Twig template component generates RSS feed and makes it discoverable by rendering proper link in the head section of website.
#twig component
4 years ago

Testing emails sent by Craft CMS using Mailtrap

Learn how to redirect all Craft CMS emails to fake SMTP server Mailtrap, in order to test and debug your messages.
#email #debugging
4 years ago

Quick edit link - Twig component for Craft CMS

Quick edit link component creates page-specific link to control panel, letting you quickly edit entry or category.
#twig component #control panel
4 years ago

Filtering entries in control panel using Searchit plugin

Searchit is powerfull Craft CMS plugin that allows you to filter trough content in control panel. In this article you will learn how to filter entries by categories, creating "category tree" widget.
#control panel #plugins
4 years ago

Fetching routes into Twig templates in Craft CMS

Most Craft developers hardcode routes structure within links created in Twig templates. There is however a way to fetch routes directly into templates and avoid creating duplicate code.
#routing #macro
Copyright ©2023 Piotr Pogorzelski