<p>Unless I'm mistaken, it looks like you don't actually need to override that whole template. It sounds like you really just want to <strong>add a column (or multiple columns) to the assets index view</strong>.</p>

<p>The modal that you're showing is using the same logic as the main assets index view. So it's simply a matter of adding your own custom columns to that, and then selecting those columns to be included.</p>

<p>The <a href="https://craftcms.com/docs/plugins/hooks-reference#defineAdditionalAssetTableAttributes" rel="nofollow noreferrer">defineAdditionalAssetTableAttributes</a> hook allows you to create new columns for your assets index. You'll still need to select those columns via the UI in the control panel (which is super easy).</p>

<p>You'll probably also need to use the <a href="https://craftcms.com/docs/plugins/hooks-reference#getAssetTableAttributeHtml" rel="nofollow noreferrer">getAssetTableAttributeHtml</a> hook, which allows you to customize how your column's data is displayed.</p>

<p>Using both of these hooks together will allow you to add whatever additional columns you'd like to the asset index view. And once you've selected your new custom columns, the exact same columns will appear in the modal view (like in your screenshot).</p>

CC BY-SA 3.0
2018-01-23T18:15:44.303Z
2018-01-23T18:15:44.303Z
Lindsey D
<p>Is it possible to create a plugin that overrides a control panel template, and still be able to update Craft normally?</p>

<p>What I'd like to achieve:</p>

<p>I have a custom field with information on every asset in the assets panel. I want to see this custom field when I upload / select an asset in an entry. </p>

<p>Template I want to customize:</p>

<p><a href="https://i.sstatic.net/16Wnj.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/16Wnj.jpg" alt="template"></a></p>

<assets><plugins><control-panel><upload>
Overriding native CP template (without hacking the core)
# Overriding native CP template (without hacking the core)

(Asked by: username_0 on 2018-01-23)

Is it possible to create a plugin that overrides a control panel template, and still be able to update Craft normally?

What I'd like to achieve:

I have a custom field with information on every asset in the assets panel. I want to see this custom field when I upload / select an asset in an entry.

Template I want to customize:

[![template](https://i.sstatic.net/16Wnj.jpg)](https://i.sstatic.net/16Wnj.jpg)

**Tags:** assets, plugins, control-panel, upload


---

## 1 answers

### Answer by username_1 on 2018-01-23. Score: 1

Unless I'm mistaken, it looks like you don't actually need to override that whole template. It sounds like you really just want to **add a column (or multiple columns) to the assets index view**.

The modal that you're showing is using the same logic as the main assets index view. So it's simply a matter of adding your own custom columns to that, and then selecting those columns to be included.

The [defineAdditionalAssetTableAttributes](https://craftcms.com/docs/plugins/hooks-reference#defineAdditionalAssetTableAttributes) hook allows you to create new columns for your assets index. You'll still need to select those columns via the UI in the control panel (which is super easy).

You'll probably also need to use the [getAssetTableAttributeHtml](https://craftcms.com/docs/plugins/hooks-reference#getAssetTableAttributeHtml) hook, which allows you to customize how your column's data is displayed.

Using both of these hooks together will allow you to add whatever additional columns you'd like to the asset index view. And once you've selected your new custom columns, the exact same columns will appear in the modal view (like in your screenshot).


---

