# Content Hooks

## Available Content Hooks

| Hook Name                                                                                            | Parameters                                                                                                          |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `stylesheets`                                                                                        |                                                                                                                     |
| `SiteInfoDatabase`                                                                                   | [`site`](/building/hooks/common-parameters.md)                                                                      |
| `SiteInfoDatabase_TableList`                                                                         | [`site`](/building/hooks/common-parameters.md)                                                                      |
| `SiteInfoDatabase_TableList_TableListRow[Connect]:Before`                                            | [`site`](/building/hooks/common-parameters.md)                                                                      |
| `SiteInfoOverview`                                                                                   | [`site`](/building/hooks/common-parameters.md)                                                                      |
| `SiteInfoOverview:Before`                                                                            | [`site`](/building/hooks/common-parameters.md)                                                                      |
| `SiteInfoOverview_TableList`                                                                         | [`site`](/building/hooks/common-parameters.md)                                                                      |
| `SiteInfoOverview_TableList:Before`                                                                  | [`site`](/building/hooks/common-parameters.md)                                                                      |
| `SiteInfo_TabNav_Items`                                                                              | [`site`](/building/hooks/common-parameters.md)                                                                      |
| `SiteInfo_Top_TopRight`                                                                              | [`site`](/building/hooks/common-parameters.md#site) [`siteStatus`](/building/hooks/common-parameters.md#sitestatus) |
| `SitesSidebar_SitesSidebarSites:Before`                                                              |                                                                                                                     |
| `SitesSidebar_SitesSidebarSites`                                                                     |                                                                                                                     |
| `SiteInfoSSL`                                                                                        | [`site`](/building/hooks/common-parameters.md)                                                                      |
| `SiteInfoSSL_TableList`                                                                              | [`site`](/building/hooks/common-parameters.md)                                                                      |
| `SiteInfoUtilities`                                                                                  | [`site`](/building/hooks/common-parameters.md)                                                                      |
| `SiteInfoUtilities_TableList`                                                                        | [`site`](/building/hooks/common-parameters.md)                                                                      |
| <p><code>routesRoot</code></p><p>Accepts React Router <code>\<Route /></code> components</p>         |                                                                                                                     |
| <p><code>routes\[main]</code></p><p>Accepts React Router <code>\<Route /></code> components</p>      |                                                                                                                     |
| <p><code>routes\[site-info]</code></p><p>Accepts React Router <code>\<Route /></code> components</p> |                                                                                                                     |

### Examples

#### Adding a React Component [(source)](https://github.com/getflywheel/local-addon-volumes/blob/master/src/renderer.jsx#L9-L10)

```jsx
hooks.addContent('SiteInfoOverview', (site) => {
    return (
        <Notes key="notes" site={site} />
    );
});
```

{% hint style="info" %}
Content Hooks are added to an array of React Components. This means all components need to have a `key` prop.
{% endhint %}

#### Adding a Route [(source)](https://github.com/getflywheel/local-addon-stats/blob/master/src/renderer.js#L13-L15)

```jsx
hooks.addContent('routesSiteInfo', () => {
    return (
        <Route 
            key="site-info-stats" 
            path="/site-info/:siteID/stats" 
            component={SiteInfoStats}
        />
    );
});
```

## Environment Content Hooks

The following Content Hooks are meant to be used by Environments such as the Preferred and Custom Environment.

{% hint style="warning" %}
`ENV_ID` and `ENV_VERSION` are for illustrative purposes only and should be replaced with a static value or variable.
{% endhint %}

`ENV_ID` and `ENV_VERSION` are in the hook name to allow for multiple Environments to be loaded at the same time and to cut down on the number of conditionals required.

| Hook Name                                                       |
| --------------------------------------------------------------- |
| `NewSiteEnvironment[ENV_ID][ENV_VERSION]_AddSiteContent_Inner`  |
| `SaveBlueprintPage[ENV_ID][ENV_VERSION]_SettingsPane_TableList` |
| `SettingsNewSiteDefaults[ENV_ID][ENV_VERSION]`                  |
| `SiteInfoEnvironmentMySQL[ENV_ID][ENV_VERSION]`                 |
| `SiteInfoEnvironmentPHP[ENV_ID:ENV_VERSION]`                    |
| `SiteInfoEnvironmentWebServer[ENV_ID][ENV_VERSION]`             |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://build.localwp.com/building/hooks/content-hooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
