---
schema_version: "1"
id: 498ba2a01326047e7d4afd806690e39477e40584b3d3076f0e5de8235e6e2d6e
title: INCLUDE
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/customize_functions_include.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.customize_functions_include.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9e2771863a0f713bfb889ed0a2a68927487a9f1ad685e9f5614ee667c197a415
description: Returns content from an s-control snippet. Use this function to reuse common code in many s-controls.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# INCLUDE

Returns content from an s-control snippet. Use this function to reuse common code in many s-controls.

## Use

`{!INCLUDE(source, [inputs])}` and replace source with the s-control snippet you want to reference. Replace inputs with any information you need to pass the snippet.

## Tips

- Because this function references an s-control snippet and does not copy it, it always runs the latest content of the s-control snippet. Remember that changing your s-control snippet affects all INCLUDE functions that refer to it.
- Use the $Request global variable to access any information inside the snippet.
- This function is only available in custom buttons, links, and s-controls.

![S-Control Example: Include a Header Snippet](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

S-Control Example: Include a Header Snippet

```html
<html>
    <body>
        {!INCLUDE(
            $SControl.Header_Snippet, 
            [title = "My Title", theme = "modern"]
         )}
    </body>
</html>
```

This example references a snippet that provides a header for a page that you created to display in a web tab. It displays the page title “My Title.” Use the $SControl global variable to reference a custom s-control.

![S-Control Example: Include Input Parameters](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

S-Control Example: Include Input Parameters

Use the following two examples to see how you can create a reusable snippet and include it in an s-control.

```html
<h2 class="{!$Request.titleTheme}.title">
    {!$Request.titleText}
</h2>
```

This snippet requires two input parameters: titleTheme and titleText. It is a reusable HTML tag that presents a page title and theme based on input parameters. Next, create an s-control that includes this snippet:

```html
<html>
    <head/>
    <body> 
        {!INCLUDE(
                $SControl.Title_Snippet, 
                [titleTheme = "modern", titleText = "My Sample Title"]
        )}
        Insert your page-specific content here ... 
    </body> 
</html>
```

This s-control uses the snippet titled Title\_Snippet to display the title of the page “My Sample Title” and modern theme. Replace Insert your page specific content here with your own HTML content and use the s-control as the source of a web tab to create your own pages in Salesforce.