FORSMILE
JA

Tech Blog

Tech articles on web development & AI (11 articles)

AllAIAMPCSSJavaScriptNUXTSmartySymfonyTwigVUEWordPress開発記事
Twig2021/06/29

How to Concatenate/Combine Variables and Strings [Twig]

This article introduces how to combine variables and strings within a Twig template.

Read More →
Twig2021/03/29

[Twig] Counting the Number of Elements in an Array

Official: Documentation -- Length

Read More →
Twig2021/02/25

[Twig] How to Use Macros (with Examples)

Twig macros are equivalent to functions in regular programming languages. They allow you to turn frequently used HTML structures into reusable components.

Read More →
Twig2021/02/09

[Twig] A Summary of Available Operators

The operators +, -, /, %, //, *, and ** are available.

Read More →
Twig2021/02/08

[Twig] How to Control Whitespace

When coding, you might sometimes want to remove spaces between HTML tags or newlines.

Read More →
Twig2021/02/04

[Twig] Displaying Arrays & Calling Methods (attribute function)

An introduction to how to use Twig's `attribute` function.

Read More →
Twig2021/02/02

[Twig] Getting Current URLs and Generating Paths

This post focuses on Twig, specifically the Twig extensions provided by Symfony.

Read More →
Twig2021/01/28

[Twig] Template Structure and Usage (include/extends)

When using a template engine, it's uncommon to manage each display screen with a single template.

Read More →
Twig2021/01/25

[Twig] How to Use the for Loop and Simple Examples

This article introduces how to use the Twig for loop and provides simple examples.

Read More →
Twig2021/01/21

[Twig] A Comprehensive Guide to Conditional Statements (if)

I'd like to introduce how to use Twig's conditional statements, including some common real-world scenarios.

Read More →
Twig2021/01/20

[Twig] How to Define Variables and Arrays (using `set`) and Display Them

I've previously written about Smarty, but Twig is another frequently used PHP template engine.

Read More →