<p>Have a look in <strong>craft/app/templates</strong> for tons of great, easily-reusable examples that make up the existing control panel! They may not be documented, but there's a whole lot of quality stuff there.</p>

<p>You may also want to consider using macros from <strong>craft/app/templates/_includes</strong> (<a href="http://buildwithcraft.com/docs/apis/templatesservice" rel="nofollow">Craft TemplatesService doc</a>, <a href="http://twig.sensiolabs.org/doc/tags/macro.html" rel="nofollow">Twig macro doc</a>), which will go a long way toward good DRY templates.</p>

<p>Bonus: this is also a great way to learn clever ways of doing things in Twig, like breadcrumbs for example. P&amp;T builds excellent stuff, so there's lots to learn from and steal whether it's for the control panel or the front end.</p>

CC BY-SA 4.0
2019-05-01T20:42:13.857Z
Any pro-tips for how to do this in Craft 3, @MattStein?
Rob Erskine
CC BY-SA 4.0
2019-05-01T20:50:31.323Z
Same basic advice @RobErskine! Make a pot of coffee, clone https://github.com/craftcms/cms, and start digging around `src/templates`. The past few years have also seen a number of first-party plugins worth checking out: https://github.com/craftcms. A look under the hood at any P&T work is guaranteed to be 100% Crafty.
Matt Stein
CC BY-SA 3.0
2014-06-13T17:43:50.573Z
I would point out the macros folder if he's building forms in the Control Panel. And a future thought, it would be great if some of this was documented somewhere. Especially the element layouts and form macros.
Bryan Redeagle
CC BY-SA 3.0
2014-06-13T17:51:57.670Z
There I go again, learning something even in a closed-loop self-question! Thanks Bryan.
Matt Stein
CC BY-SA 3.0
2014-06-15T00:47:44.257Z
Those macros are sticking with you, heh @Matt?
carlcs
CC BY-SA 3.0
2014-06-15T01:19:54.483Z
@Christian You bet! In just a little while, I'll be able to pretend I knew all along.
Matt Stein
CC BY-SA 3.0
2014-06-15T01:29:24.487Z
@Matt I meant over here at SE, actually. Didn't know how to better express that in english! O.o
carlcs
CC BY-SA 3.0
2014-06-15T03:03:55.367Z
@ChristianSeelbach No worries, I can *only* express things in English. Or some really awful Spanish or French.
Matt Stein
CC BY-SA 3.0
2014-06-13T17:30:23.277Z
2016-08-15T16:56:46.440Z
2016-08-15T16:56:46.440Z
Matt Stein
<p>I'm new to building plugins and I need to make templates for the control panel. How can I use existing Craft UI components to keep things consistent and save myself from having to rebuild everything?</p>

<templating><plugin-development><control-panel>
How can I utilize existing UI for my plugin's control panel views?
# How can I utilize existing UI for my plugin's control panel views?

(Asked by: username_0 on 2014-06-13)

I'm new to building plugins and I need to make templates for the control panel. How can I use existing Craft UI components to keep things consistent and save myself from having to rebuild everything?

**Tags:** templating, plugin-development, control-panel


---

## 1 answers

### Answer by username_0 on 2014-06-13. Score: 10 | Accepted answer

Have a look in **craft/app/templates** for tons of great, easily-reusable examples that make up the existing control panel! They may not be documented, but there's a whole lot of quality stuff there.

You may also want to consider using macros from **craft/app/templates/\_includes** ([Craft TemplatesService doc](http://buildwithcraft.com/docs/apis/templatesservice), [Twig macro doc](http://twig.sensiolabs.org/doc/tags/macro.html)), which will go a long way toward good DRY templates.

Bonus: this is also a great way to learn clever ways of doing things in Twig, like breadcrumbs for example. P&T builds excellent stuff, so there's lots to learn from and steal whether it's for the control panel or the front end.

> **Comments:**
> **username_2**: I would point out the macros folder if he's building forms in the Control Panel. And a future thought, it would be great if some of this was documented somewhere. Especially the element layouts and form macros.  
> **username_0**: There I go again, learning something even in a closed-loop self-question! Thanks Bryan.  
> **username_3**: Those macros are sticking with you, heh @Matt?  
> **username_0**: @Christian You bet! In just a little while, I'll be able to pretend I knew all along.  
> **username_3**: @Matt I meant over here at SE, actually. Didn't know how to better express that in english! O.o  
> **username_0**: @ChristianSeelbach No worries, I can *only* express things in English. Or some really awful Spanish or French.  
> **username_1**: Any pro-tips for how to do this in Craft 3, @MattStein?  
> **username_0**: Same basic advice @RobErskine! Make a pot of coffee, clone https://github.com/craftcms/cms, and start digging around `src/templates`. The past few years have also seen a number of first-party plugins worth checking out: https://github.com/craftcms. A look under the hood at any P&T work is guaranteed to be 100% Crafty.  

---

