---
title: "How do I get custom code onto my page/template?"
date: "2018-03-27T07:50:48+00:00"
summary: "Learn how to add custom code to your website using Field Formatters, Blocks, and Custom Site Studio elements. Discover developer-friendly methods for integrating unique layouts and functionality into your site's templates."
image:
type: "article"
url: "/drupal-starter-kits/add-ons/site-studio/help/64916-how-do-i-get-custom-code-my-pagetemplate"
id: "04da3c70-4bf3-4ea2-a5b6-5b1e1dda232c"
---

If you want to add custom code to your website you can use Field formatters, Blocks and Custom Site Studio elements.

### Field Formatters

Field data from content entities can be rendered on a Site Studio template either as raw data via tokens, or using the field’s default Field Formatter. If using a Field Formatter, the output will be exactly as defined by the field module. This means Site Studio will work seamlessly with core fields and contributed modules that supply their own layout and templates for their field output. Developers are also able to create custom fields with custom formatters and Site Studio will render these exactly as the developer has defined.

### Blocks

The simplest way to inject developer created layout and styling into the Site Studio templates is to define them as a standard Drupal block. With that approach you can create any layout you need, bring in blocks defined in drupal.org modules and retain 100% control of the layout of that block.

### Custom Site Studio elements

The downside of using a block is there is no way to give a site builder options from within the Site Studio sidebar editor. To do this, you can create your own Site Studio element and define its form using the Plugin API.