# leveraging

Published articles for leveraging.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Going Global with Twig Globals in Craft CMS

DevFeed: [Going Global with Twig Globals in Craft CMS](<https://devfeed.tech/articles/going-global-with-twig-globals-in-craft-cms-31265.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/going-global-with-twig-globals-in-craft-cms>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2024-09-02T18:25:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [Content Management System](<https://devfeed.tech/topics/cms.md>), [Web](<https://devfeed.tech/topics/web.md>), [coding](<https://devfeed.tech/topics/coding.md>)

Tags: [added](<https://devfeed.tech/tags/added.md>), [article](<https://devfeed.tech/tags/article.md>), [challenges](<https://devfeed.tech/tags/challenges.md>), [cms](<https://devfeed.tech/tags/cms.md>), [collection](<https://devfeed.tech/tags/collection.md>), [craft](<https://devfeed.tech/tags/craft.md>), [global](<https://devfeed.tech/tags/global.md>), [globals](<https://devfeed.tech/tags/globals.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [insights](<https://devfeed.tech/tags/insights.md>), [learn](<https://devfeed.tech/tags/learn.md>), [leveraging](<https://devfeed.tech/tags/leveraging.md>), [simplify](<https://devfeed.tech/tags/simplify.md>), [templating](<https://devfeed.tech/tags/templating.md>), [twig](<https://devfeed.tech/tags/twig.md>), [variables](<https://devfeed.tech/tags/variables.md>)

### AI overview

This tutorial explains how variable scope works in Twig templates used by Craft CMS, including the challenges of making variables globally available. It discusses the trade-offs of global variables and how they can reduce component reusability and modularity, while noting that they can be appropriate in simpler websites.

### Source excerpt

Learn how to simplify some Twig templating challenges by leveraging the global variables & the _globals Collection added in Craft CMS 4.5

## Connecting to an External Database in Craft CMS

DevFeed: [Connecting to an External Database in Craft CMS](<https://devfeed.tech/articles/connecting-to-an-external-database-in-craft-cms-31247.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/connecting-to-an-external-database-in-craft-cms>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2024-08-06T14:03:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [Databases](<https://devfeed.tech/topics/databases.md>), [Content Management System](<https://devfeed.tech/topics/cms.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [MariaDB](<https://devfeed.tech/topics/mariadb.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [SQLite](<https://devfeed.tech/topics/sqlite.md>), [legacy](<https://devfeed.tech/topics/legacy.md>)

Tags: [application](<https://devfeed.tech/tags/application.md>), [built-in](<https://devfeed.tech/tags/built-in.md>), [cms](<https://devfeed.tech/tags/cms.md>), [components](<https://devfeed.tech/tags/components.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [connect](<https://devfeed.tech/tags/connect.md>), [craft](<https://devfeed.tech/tags/craft.md>), [database](<https://devfeed.tech/tags/database.md>), [external](<https://devfeed.tech/tags/external.md>), [flexibility](<https://devfeed.tech/tags/flexibility.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [insights](<https://devfeed.tech/tags/insights.md>), [learn](<https://devfeed.tech/tags/learn.md>), [legacy](<https://devfeed.tech/tags/legacy.md>), [leveraging](<https://devfeed.tech/tags/leveraging.md>), [mariadb](<https://devfeed.tech/tags/mariadb.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>), [using](<https://devfeed.tech/tags/using.md>)

### AI overview

A tutorial explaining how to connect Craft CMS to an external database using Twig and configuration in config/app.php, without requiring the deprecated Connect plugin. It covers Craft application components and database types supported through Yii2.

### Source excerpt

Learn how to connect to an external database using Craft CMS by leveraging the built-in flexibility of application components

## Leveraging Python Standard Library via WebAssembly

DevFeed: [Leveraging Python Standard Library via WebAssembly](<https://devfeed.tech/articles/leveraging-python-standard-library-via-webassembly-15290.md>)

Original publisher: [Read original article](<https://www.fermyon.com/blog/leveraging-python-standard-library-via-webassembly>)

Author: Tim McCallum

Published: 2024-01-10T12:00:00Z

Content type: article

Language: en

Sources: [Fermyon - Experience the next wave of cloud computing.](<https://devfeed.tech/sources/fermyon-experience-the-next-wave-of-cloud-computing.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [Library](<https://devfeed.tech/topics/library.md>), [Web](<https://devfeed.tech/topics/web.md>)

Tags: [complex](<https://devfeed.tech/tags/complex.md>), [leveraging](<https://devfeed.tech/tags/leveraging.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [problems](<https://devfeed.tech/tags/problems.md>), [python](<https://devfeed.tech/tags/python.md>), [simplify](<https://devfeed.tech/tags/simplify.md>), [standard](<https://devfeed.tech/tags/standard.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [web](<https://devfeed.tech/tags/web.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

### AI overview

The article explores how Python's extensive standard library, compiled to WebAssembly, can simplify solving complex mathematical problems over the web.

### Source excerpt

Explore how Python's extensive libraries, when compiled to WebAssembly, simplify solving complex mathematical problems over the web

## Creating a custom field in Craft CMS

DevFeed: [Creating a custom field in Craft CMS](<https://devfeed.tech/articles/creating-a-custom-field-in-craft-cms-31251.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/creating-a-custom-field-in-craft-cms>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2020-08-27T04:00:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [Content Management System](<https://devfeed.tech/topics/cms.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [cms](<https://devfeed.tech/tags/cms.md>), [code](<https://devfeed.tech/tags/code.md>), [craft](<https://devfeed.tech/tags/craft.md>), [create](<https://devfeed.tech/tags/create.md>), [custom](<https://devfeed.tech/tags/custom.md>), [field](<https://devfeed.tech/tags/field.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [insights](<https://devfeed.tech/tags/insights.md>), [learn](<https://devfeed.tech/tags/learn.md>), [leveraging](<https://devfeed.tech/tags/leveraging.md>), [little](<https://devfeed.tech/tags/little.md>), [platform](<https://devfeed.tech/tags/platform.md>), [possible](<https://devfeed.tech/tags/possible.md>), [writing](<https://devfeed.tech/tags/writing.md>)

### AI overview

A tutorial on creating a custom field in Craft CMS whose dropdown options come from Craft Commerce country data. It recommends subclassing the built-in Craft Dropdown field and changing only the required behavior to reduce code and maintenance.

### Source excerpt

Learn how to create a custom field in Craft CMS, writing as little code as possible by leveraging the platform.

## Setting Up Your Own Image Transform Service

DevFeed: [Setting Up Your Own Image Transform Service](<https://devfeed.tech/articles/setting-up-your-own-image-transform-service-31297.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/setting-up-your-own-image-transform-service>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2019-07-05T15:33:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [AWS Lambda](<https://devfeed.tech/topics/aws-lambda.md>), [Serverless](<https://devfeed.tech/topics/serverless.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [modern web development](<https://devfeed.tech/topics/modern-web-development.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>)

Tags: [aws-lambda](<https://devfeed.tech/tags/aws-lambda.md>), [build](<https://devfeed.tech/tags/build.md>), [cloudfront](<https://devfeed.tech/tags/cloudfront.md>), [cloudinary](<https://devfeed.tech/tags/cloudinary.md>), [compression](<https://devfeed.tech/tags/compression.md>), [create](<https://devfeed.tech/tags/create.md>), [handler](<https://devfeed.tech/tags/handler.md>), [hosting](<https://devfeed.tech/tags/hosting.md>), [image](<https://devfeed.tech/tags/image.md>), [images](<https://devfeed.tech/tags/images.md>), [insights](<https://devfeed.tech/tags/insights.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [leveraging](<https://devfeed.tech/tags/leveraging.md>), [optimized-transformed](<https://devfeed.tech/tags/optimized-transformed.md>), [pennies](<https://devfeed.tech/tags/pennies.md>), [power](<https://devfeed.tech/tags/power.md>), [serverless](<https://devfeed.tech/tags/serverless.md>)

### AI overview

This tutorial explains how to use AWS Lambda and the AWS Serverless Image Handler, fronted by CloudFront, to offload processor-intensive image transformations from a website server. It presents the approach as an inexpensive option for creating optimized images and discusses its use with server-rendered and JAMstack sites.

### Source excerpt

Create optimized/transformed images for pennies by leveraging the power of AWS Lambda to create your own Serverless Image Handler