Skip to content

Add twig section render functions - #3

Merged
javihgil merged 1 commit into
5.5from
add-twig-render-functions
Oct 15, 2025
Merged

Add twig section render functions#3
javihgil merged 1 commit into
5.5from
add-twig-render-functions

Conversation

@javihgil

@javihgil javihgil commented Oct 15, 2025

Copy link
Copy Markdown
Member

Added new functions for twig:

sfs_cms_section_find
sfs_cms_section_find_by_*
sfs_cms_section
sfs_cms_section_embed
sfs_cms_section_embed_by_
sfs_cms_section_esi
sfs_cms_section_esi_by_
sfs_cms_section_ajax
sfs_cms_section_ajax_by_

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Twig section render functions to the CMS sections plugin, providing template functions for finding and rendering sections in different modes (embed, ESI, and AJAX).

Key changes:

  • Introduces a new RenderExtension class with multiple Twig functions for section operations
  • Updates service configuration to register all Twig extensions instead of just admin-specific ones

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/Twig/Extension/RenderExtension.php New Twig extension providing section finding and rendering functions
config/services/admin_services.yaml Updated service registration to include all Twig extensions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/Twig/Extension/RenderExtension.php
Comment thread src/Twig/Extension/RenderExtension.php
Comment thread src/Twig/Extension/RenderExtension.php
Comment thread src/Twig/Extension/RenderExtension.php
Comment thread src/Twig/Extension/RenderExtension.php
@javihgil
javihgil merged commit 63e40ee into 5.5 Oct 15, 2025
3 checks passed
@javihgil
javihgil deleted the add-twig-render-functions branch October 15, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants