Showing 10 of 2,044 results.

Creating Image Templates

Social Media Image Kit creates images by rendering Antlers or Blade templates and converting the results to an image. By default, templates must be stored within the following folder: 1 resources/views/social-media-image-kit/ A very basic template...

Templating Considerations | Creating Image Templates

When creating templates, be sure to keep the following considerations in mind: Templates are rendered using raw HTML, and do not make a request to your site for each page. General Cascade data will be made available to you, but you should not rely...

Front-end Templates

There are two ways to add the web manifest HTML tag(s) to your site's front-end templates: the dedicated Antlers tag and the metadata provider.The se_web_manifest Antlers tag may be used to output the HTML tag for your site's generated manifest...

setDirectiveNames | Blade Documents

Sets the document's directive names. The directive names supplied to this method should match those that were used when initially parsing the input template. These directive names will be used when performing structural analysis. If you are using...

getNodes | Blade Documents

Gets the document nodes. Returns a NodeCollection instance containing the nodes that represent the parsed template. 1 <?php 2 3 use Stillat \ BladeParser \ Nodes \ NodeCollection ; 4 5 public function getNodes ( ) : NodeCollection ;

toString | Blade Documents

Returns a string representation of the document. This method will traverse every node in the document and call its corresponding toString() method. Any modifications made to the document's node will be represented in the results of this method...

Creating Dynamic CSS Class Names with Statamic

In this article, we will look at one way to construct dynamic CSS class names when writing Antlers templates for a Statamic site. This technique will utilize the Antlers Runtime parser and the yield and section features.

Generating Image | Events

The GeneratingImage event is fired right before a social media image kit generates an image. The event object will have the following properties: $entry, : The entry the image will be generated for., $size, : The details from the configuration...

Image Generated | Events

The ImageGenerated event is fired right after a social media image has been generated. The event object will have the following properties: $entry, : The entry the image will be generated for., $size, : The details from the configuration file for...

Prettier 2 | Prettier Plugin Installation

If you are using Prettier 2, you must use version 1 of prettier-plugin-blade : 1 npm install prettier-plugin-blade@^1 After installing prettier-plugin-blade in your project, you can add the following to your project's .prettierrc file: 1 { 2 "...