# Panel Content Screen Hooks

https://dev.wisecp.com/es/admin-content-screen-hooks

The twenty-two placement points of the content, message, notification and language screens: forms, lists and toolbars.

## Overview

The placement points of the site content, contact messages, notification templates and languages live here.

One thing runs through the content screens: **the same screen serves several types**. Pages, contracts, news, articles and references share one form; the message list serves five folders. Check the type if what you add should not appear on all of them.

## Reference

### After the page title

uiadmin.content.page_title.after

`admin/manage-website` on many pages

Appears after the title on the content management pages. The controller name tells you which page you are on.

Parameters 1

$controllerstringThe name of the active controller. The hook runs on several pages: without a check your output appears on all of them.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.content.page_title.after', 10, function ($controller) {
    // Kanca birden cok sayfada calisir.
    if ($controller !== 'pages') return null;

    return '<span class="badge bg-secondary">Acme</span>';
});
```

### Above the content form

uiadmin.content_edit.before_content

`admin/manage-website` five content types

Appears above the content edit form.

Parameters 2

$page_typestringThe content type: page, contract, news, article or reference. The same screen serves five types: check this if what you add should not appear on all of them.

$detailarrayThe content record being edited. It is **empty when creating**.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.content_edit.before_content', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### Below the content form

uiadmin.content_edit.bottom

`admin/manage-website` five content types

Appears below the same form. The place to add a metadata field of your own.

Parameters 2

$page_typestringThe content type: page, contract, news, article or reference. The same screen serves five types: check this if what you add should not appear on all of them.

$detailarrayThe content record being edited. It is **empty when creating**.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.content_edit.bottom', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### The content list toolbar

uiadmin.content_list.toolbar

`admin/manage-website` the screen links

Appears in the toolbar of the content list. The links of the screen itself are in your hands too.

Parameters 2

$page_typestringThe content type: page, contract, news, article or reference. The same screen serves five types: check this if what you add should not appear on all of them.

$linksarrayThe links of the screen: controller, add, categories and contracts.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.content_list.toolbar', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### Above the table on the content list

uiadmin.content_list.before_table

`admin/manage-website` above the table

Appears immediately above the content table.

Parameters 1

$page_typestringThe content type: page, contract, news, article or reference. The same screen serves five types: check this if what you add should not appear on all of them.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.content_list.before_table', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### The bottom of the content category form

uiadmin.content_category_edit.bottom

`admin/manage-website` two category types

Appears below the form of the blog and reference categories.

Parameters 2

$category_typestringThe category type: article or reference.

$detailarrayThe category being edited. It is **empty when creating**.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.content_category_edit.bottom', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### The bottom of the slide form

uiadmin.slide_edit.bottom

`admin/manage-website` empty when creating

Appears below the home page slide form.

Parameters 1

$detailarrayThe slide being edited. It is **empty when creating**.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.slide_edit.bottom', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### The message action area

uiadmin.messages_detail.actions

`admin/manage-website/messages` no parameters

Appears in the action area of a contact message.

Parameters 0

—It takes no parameters.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.messages_detail.actions', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### The message toolbar

uiadmin.messages_detail.message.toolbar

`admin/manage-website/messages` no parameters

Appears in the toolbar of the message itself.

Parameters 0

—It takes no parameters.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.messages_detail.message.toolbar', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### The message reply form toolbar

uiadmin.messages_detail.reply_form.toolbar

`admin/manage-website/messages` no parameters

Appears in the toolbar of the reply form.

Parameters 0

—It takes no parameters.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.messages_detail.reply_form.toolbar', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### Below the message editor

uiadmin.messages_detail.reply_editor.after

`admin/manage-website/messages` no parameters

Appears immediately below the reply editor.

Parameters 0

—It takes no parameters.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.messages_detail.reply_editor.after', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### The message list toolbar

uiadmin.messages_list.toolbar

`admin/manage-website/messages` the folder arrives

Appears in the toolbar of the contact message list.

Parameters 1

$folderstringThe open folder: unread, read, replied, spam or trash. The same toolbar serves all five folders.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.messages_list.toolbar', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### The notification template list toolbar

uiadmin.notification_list.toolbar

`admin/notifications` grouped template list

Appears in the toolbar of the notification template list.

Parameters 1

$templatesarrayEvery template group, each carrying its name and items. It is not a flat list but a **two-level** structure: walk the groups and look inside.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.notification_list.toolbar', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### Above the table on the template list

uiadmin.notification_list.before_table

`admin/notifications` grouped template list

Appears immediately above the template table.

Parameters 1

$templatesarrayEvery template group, each carrying its name and items. It is not a flat list but a **two-level** structure: walk the groups and look inside.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.notification_list.before_table', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### The bottom of the template list

uiadmin.notification_list.bottom

`admin/notifications` grouped template list

Appears at the very bottom of the template list.

Parameters 1

$templatesarrayEvery template group, each carrying its name and items. It is not a flat list but a **two-level** structure: walk the groups and look inside.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.notification_list.bottom', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### Above the template form

uiadmin.notification_edit.before_content

`admin/notifications` group and key

Appears above the notification template edit form.

Parameters 3

$nTemplatearrayThe template being edited: its status, language contents and recipient settings.

$nGroupstringThe group of the template.

$nKeystringThe key of the template. Test the group and the key together to recognise your own template.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.notification_edit.before_content', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### Below the template form

uiadmin.notification_edit.bottom

`admin/notifications` group and key

Appears below the same form. The place to show a list of your own variables.

Parameters 3

$nTemplatearrayThe template being edited: its status, language contents and recipient settings.

$nGroupstringThe group of the template.

$nKeystringThe key of the template. Test the group and the key together to recognise your own template.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.notification_edit.bottom', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### Above the notification settings form

uiadmin.notification_settings.before_form

`admin/notifications` the shared shell code

Appears above the notification shell settings.

Parameters 1

$settingsarrayThe current settings: per-language header, body and footer code, and the logo paths. That code is the shell of **every** notification: a change here reaches every message sent.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.notification_settings.before_form', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### The language list toolbar

uiadmin.language_list.toolbar

`admin/languages` no parameters

Appears in the toolbar of the language list.

Parameters 0

—It takes no parameters.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.language_list.toolbar', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### Above the table on the language list

uiadmin.language_list.before_table

`admin/languages` no parameters

Appears immediately above the language table.

Parameters 0

—It takes no parameters.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.language_list.before_table', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### Above the language form

uiadmin.language_edit.before_content

`admin/languages` empty when creating

Appears above the language add and edit form.

Parameters 1

$detailarrayThe language being edited: its name, status, whether it is local, and its writing direction. It is **empty when creating**.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.language_edit.before_content', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

### Below the language form

uiadmin.language_edit.bottom

`admin/languages` empty when creating

Appears below the same form.

Parameters 1

$detailarrayThe language being edited: its name, status, whether it is local, and its writing direction. It is **empty when creating**.

Return 1

string|nullThe **HTML you return appears**. With several listeners the outputs are appended one after another in priority order. Empty text, `null` and `false` are skipped, so return `null` when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.

Listener PHP

```php
Hook::add('ui:admin.language_edit.bottom', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});
```

## Pitfalls

> **One screen serves many types**
> 
> The content form serves five separate types, the message list five folders, and the page title point many controllers. A listener that outputs without checking the type shows a **blog field** to an administrator editing a contract.

> **The template list has two levels**
> 
> The list at the notification template points is not flat: first come the **groups**, then the items of each group. A listener walking it as one level never sees the items at all.

## Related Articles

- [Notification Hooks](https://dev.wisecp.com/en/notification-hooks)
- [Language and Translation Hooks](https://dev.wisecp.com/en/language-and-translation-hooks)
- [Management Panel Hooks](https://dev.wisecp.com/en/hooks-in-the-management-panel)
