Custom Sulu Template Development

Custom Sulu Template Development

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1285
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1240
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    982
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1032
  • image_website-sbh_0.webp
    Website development for SBH Partners
    1104
  • image_website-_0.webp
    Website development for Red Pear
    553

Custom Sulu Template Development

A client recently approached us with a task: a service page needed to contain blocks for “Text,” “Image+Text,” “Call to Action,” and a sidebar with a feedback form. Sulu’s standard templates didn’t offer that combination—they would have had to hack the admin interface or create a custom template. We built the solution in 2 days: an XML schema with the required block types, a Twig template for rendering, and a custom controller to load testimonials. Now the manager can assemble the page from ready-made blocks in minutes. Our team has 5+ years of experience with Sulu CMS and has delivered 20+ projects, ensuring bug-free, requirement-compliant output. This flexibility lets our clients save up to 30% on maintenance budgets by eliminating hacks. When developing 5–8 custom templates for a corporate site, savings can reach 40% compared to purchasing a ready-made solution.

Why a Custom Sulu Template Is Better Than a Standard One

Standard templates cover basic needs. But for unique pages, you often need fields that aren’t in the box. A custom template allows:

  • Add any field types: text editors, media, blocks with arbitrary structure.
  • Create multiple layouts for the same page type.
  • Connect a custom controller to load additional data (e.g., related records or testimonials).
  • Control the view through Twig templates without limitations.

The result is flexibility impossible with standard solutions, with maintenance cost reduction of 30–50% thanks to eliminating workarounds. According to Sulu documentation, custom controllers save time on integrations.

How to Develop a Custom Sulu Template

The process includes several stages:

  1. Analyze page requirements and agree on structure.
  2. Design an XML schema with fields and blocks.
  3. Develop a Twig template with the design in mind.
  4. Write a custom controller (if additional data is needed).
  5. Integrate with the existing theme and test.
  6. Deploy to the server and final verification.
  7. Provide documentation and training.

Timelines depend on complexity. Below are approximate durations for different template types.

Template Type Unique Blocks Development Time
Simple (text, media) 2–4 1–2 days
Medium (block editor, custom fields) 5–8 2–3 days
Complex (custom controller, integrations) 8+ 3–5 days

Comparison of Standard and Custom Template

Criterion Standard Template Custom Template
Number of fields Limited Unlimited
Block types Only text Text, media, CTA, gallery, etc.
Controller Only DefaultController Custom with any logic
Flexibility Low High

Example XML Template

<template xmlns="http://schemas.sulu.io/template/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.sulu.io/template/template http://schemas.sulu.io/template/template-1.0.xsd"> <key>service</key> <view>pages/service</view> <controller>App\Controller\Website\ServiceController::indexAction</controller> <cacheLifetime type="seconds">1800</cacheLifetime> <properties> <property name="title" type="text_line" mandatory="true"> <meta><title lang="en">Title</title></meta> <tag name="sulu.rlp.part"/> </property> <property name="intro" type="text_area" colspan="12"> <meta><title lang="en">Introductory text</title></meta> <params> <param name="rows" value="3"/> </params> </property> <block name="content_blocks" default-type="text" colspan="12"> <meta><title lang="en">Content blocks</title></meta> <types> <type name="text"> <meta><title lang="en">Text</title></meta> <properties> <property name="text" type="text_editor"> <meta><title lang="en">Text</title></meta> </property> </properties> </type> <type name="image_text"> <meta><title lang="en">Image + text</title></meta> <properties> <property name="image" type="single_media_selection"> <meta><title lang="en">Image</title></meta> </property> <property name="text" type="text_editor"> <meta><title lang="en">Text</title></meta> </property> <property name="image_position" type="select"> <meta><title lang="en">Image position</title></meta> <params> <param name="values" type="collection"> <param name="left" title="Left"/> <param name="right" title="Right"/> </param> </params> </property> </properties> </type> <type name="cta"> <meta><title lang="en">Call to action</title></meta> <properties> <property name="heading" type="text_line"> <meta><title lang="en">Heading</title></meta> </property> <property name="button_text" type="text_line"> <meta><title lang="en">Button text</title></meta> </property> <property name="button_link" type="text_line"> <meta><title lang="en">Link</title></meta> </property> </properties> </type> </types> </block> <section name="sidebar"> <meta><title lang="en">Sidebar</title></meta> <properties> <property name="show_form" type="checkbox"> <meta><title lang="en">Show feedback form</title></meta> <params> <param name="defaultValue" value="true"/> </params> </property> <property name="related_services" type="smart_content"> <meta><title lang="en">Related services</title></meta> <params> <param name="provider" value="pages"/> <param name="types" value="service"/> <param name="max_per_page" value="4"/> </params> </property> </properties> </section> </properties> </template> 

Twig Template

{% extends 'base.html.twig' %} {% block title %}{{ content.title }} | {{ app.request.host }}{% endblock %} {% block body %} <div class="page-service"> <h1>{{ content.title }}</h1> {% for block in content.content_blocks %} <div class="block block--{{ block.type }}"> {% if block.type == 'text' %} {{ block.text|raw }} {% elseif block.type == 'image_text' %} <img src="{{ sulu_resolve_media(block.image, locale).thumbnails['service-block'] }}" alt="" loading="lazy"> {{ block.text|raw }} {% elseif block.type == 'cta' %} <h2>{{ block.heading }}</h2> <a href="{{ block.button_link }}" class="btn">{{ block.button_text }}</a> {% endif %} </div> {% endfor %} </div> {% endblock %} 

Custom Controller

class ServiceController extends AbstractController { public function indexAction(StructureInterface $structure): Response { $testimonials = $this->testimonials->findByService($structure->getUuid(), limit: 3); return $this->render('pages/service.html.twig', [ 'content' => $structure->getContent(), 'testimonials' => $testimonials, ]); } } 

Registering the Template in Webspace

<templates> <template type="page">service</template> </templates> 

After adding the template, clear cache and reindex:

php bin/console cache:clear php bin/console sulu:document:initialize 
Typical Pitfalls and Solutions
  • Template not applied — most often forgotten to register the key in webspace or clear cache. Always check the config entry and run cache:clear.
  • Incorrect controller reference — specify the full class and method, otherwise Sulu won't find the controller. Use debug:router to verify.
  • Blocks not displayed — ensure that in the Twig template, each block type has corresponding logic. A common mistake is missing the type check in the loop.

What’s Included in the Work

  • XML schema with fields and blocks
  • Twig template with responsive layout
  • Custom controller (if needed)
  • CMS integration and access rights configuration
  • Template structure documentation
  • Training for content managers on working with blocks
  • Quality guarantee and post-deployment support

We provide custom Sulu layout and full Sulu site development. Our custom Sulu template solutions fully meet your requirements and save budget.

Timelines and How to Order

One template with block editor, custom controller, and Twig takes 2–3 days. A complete set of templates (5–8 types) for a corporate site takes 1.5–2 weeks. Cost is calculated individually based on complexity and scope.

Contact us to discuss your project—we’ll prepare a detailed proposal. Get a consultation on custom Sulu template development today.