 layout plugins getting started  layout plugins are one of the simplest and most powerful sections of the panels api there are two different ways that a layout can be implemented via panels panels supports both module and theme implementations of panels the module implementation requires that hookctoolsplugindirectory define the directory in which your layout plugins exist this same hook defines the directory for all panels plugins alternately if you intend on implementing a layout in a theme this can be done primary through the theme s info file the ctools help does a great job of actually explaining this portion of the api ctools plugins  ctools explains even the layout hooks a little in its example but we ll recap quickly and expand on this information as ctools explains the actual plugin file must be named with care as it will directly affect your naming scheme for the hook within it this is really no different from any other hook within drupal except that we ll be using multiple replacements in this case the function we re looking to implement is an instance of function yourmodulepluginnameownermoduleplugintype in our case we already know that the function will be function yourmodulepluginnamepanelslayouts this is because the plugin type we re working with is a layout and the module that implements these layouts is the panels module for the rest of the naming scheme yourmodule will be replaced with either the name of your module that implements this layout or the name of the theme and pluginname will be replaced with whatever the name of the plugin file is for purposes of this example our module name us going to be layoutsample and our plugin will be firstlayout  directory structure  we re going to assume that you ve laid your directory structure out very similarly to how panels does it something like this is rather likely layoutsample layoutsampleinfo layoutsamplemodule plugins layouts firstlayout firstlayoutcss firstlayoutinc firstlayoutpng layoutsamplefirstlayouttplphp the name of our inc file is going to be the key to the entire layout plugin the inc file  we will start with the firstlayoutinc file as it s the most important file we re dealing with here firstlayoutinc will look similar to the following plugin array title t first layout icon firstlayoutpng theme layoutsamplefirstlayout css firstlayoutcss panels array main t main region right t right region the include file defines all the other files that our layout will utilize in order to be truly useful the array is fairly self explanitory but for the sake of specificity  title  the title of our layout utilized within the panels administration screens  icon  the graphical representation of our layout utilized within the panels administration screens  theme  the template file of our layout sharp eyed readers will note that the theme definition utilizes underscores instead of dashes and does not have tplphp after it this is refering to the layoutsamplefirstlayouttplphp file all the same it is simply how the naming convention works utilize dashes in the tpl file name and underscores when refering to it in your include file  css  the css file to be utilized for our layout utilized within the panels administration screens and when viewing the actual panel itself  panels  defines all the various regions within your panel this will be further utilized within our tplphp file there are many additional properties that can be added to the include file for purposes of this document we ll also make mention of the admin css property admin css is especially useful when utilizing a fixed width layout with fixed with panel regions this can break under most administrative circumstances and panels provides you with the ability to give an additional css layout for the administrative section it s a simple nicety and looks like this plugin array title t first layout icon firstlayoutpng theme layoutsamplefirstlayout css firstlayoutcss admin css firstlayoutadmincss panels array main t main region right t right region  the tplphp file  the tplphp file is very similar to any other template file within drupal the difference here is that we re being passed an array of regions through content and we also have a css id available to us for the entire panel in the form of cssid the template is very straight forward and will look similar to the following div class paneldisplay panelstackedtwothirdsonethird clearblock php if empty cssid print id cssid div class panelpanel panelcolfirst panelregionmain div class inside php print content main div div div class panelpanel panelcollast panelregionright div class inside php print content right div div div this is simply an example of what the html could look like you can alter an update this html to fit your own needs the other files  the css and png files are as simple as any other css or png file you ve ever utilized panels provides some images for its graphical representations of its layouts i would heavily encourage you to modify these to suit your needs the css files admin and non will be included at the appropriate times simply set them up to fit your purposes if you re utilizing fixed width panel regions it s probably smart to provide an admin css file as well with your panel layout  