Skip to content
mkernel edited this page Apr 16, 2014 · 1 revision

So you heard of grid (either because we bugged you or you attended our drupalcamp ffm session) and you want to try it. This page should help you get startet.

Installation for Drupal

download/clone/fork github.com/palasthotel/grid and copy it into your lovely drupal installation into sites/all/libraries/grid. If everything is correct, you should have a sites/all/libraries/grid/grid.php.

Next: download/clone/fork github.com/palasthotel/grid-drupal and install it as a module just as you would do with every other module out there.

Afterwards, enable grid. It should detect the library and should enable right away. Visit admin/config/grid/settings and start experimenting with it.

Installation for Wordpress

download/clone/fork github.com/palasthotel/grid-wordpress and copy it as a plugin into your wordpress. Additionally, download/clone/fork github.com/palasthotel/grid and copy it into the plugin as a lib/ folder. Enable the plugin.

Grid hooks itself into wordpress in a very visible way.

Themer's Corner

So you tried grid and you like it. Now... how do you modify the HTML?

Styles

The easiest modification one can do is: define styles for containers, slots and boxes. These result in CSS classes rendered on the html elements which you can use for styling.

Generic templates

grid looks into theme/grid-templates for template files. Copy them over from the grid library and modify them as you need. Rendering always happens within a class object, so you can use $this to access the box, slot or container.

Box-type-specific templates

Besides grid-box.tpl.php you can create specific templates for each box type. simply create grid-BOXTYPE-box.tpl.php - to get the box types, have a look at the classes folder and into the different box implementations. every box has a type() method which returns the box type. Additionally there is a naming convention: all box classes are named grid_BOXTYPE_box.

I found a bug / have a feature request

Simply create an issue on this repository and assign it to me (@mkernel). I'll have a look into the issue/feature request and I'll discuss it with the team members.

If you want to submit a patch, do just as you like - either via patch files or via pull requests.