Skip to content

Commit

Permalink
#866. Add Grid docs
Browse files Browse the repository at this point in the history
  • Loading branch information
signalpoint committed Oct 19, 2016
1 parent c3cbf11 commit c3fba85
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
36 changes: 36 additions & 0 deletions docs/11_Widgets/Grid_Widget.md
@@ -0,0 +1,36 @@
We can easily render [jQuery Mobile Grids](http://demos.jquerymobile.com/1.4.5/grids/) with DrupalGap.

![Grid Widget](http://drupalgap.org/sites/default/files/jqm-grid.png)

## Render Array

```
var content = {};
content['my_grid'] = {
theme: 'jqm_grid',
columns: 2,
items: [
bl('Foo', 'foo'),
bl('Bar', 'bar'),
bl('Baz', 'baz'),
bl('Chop', 'chop')
]
};
return content;
```

## theme('jqm_grid', ...)

```
var html = theme('jqm_grid', {
columns: 2,
items: [
bl('Foo', 'foo'),
bl('Bar', 'bar'),
bl('Baz', 'baz'),
bl('Chop', 'chop')
]
});
return html;
```

6 changes: 5 additions & 1 deletion docs/11_Widgets/index.md
Expand Up @@ -40,6 +40,10 @@ Below are screen shots of various supported widgets. To see example code for a p

[![Controlgroup Widget](http://drupalgap.com/sites/default/files/controlgroup-widget.png)](Widgets/Controlgroup_Widget)

## Grid Widget

[![Grid Widget](http://drupalgap.org/sites/default/files/jqm-grid.png)](Widgets/Grid_Widget)

## Header Widget

[![Header Widget](http://drupalgap.com/sites/default/files/header-widget.png)](Widgets/Header_Widget)
Expand Down Expand Up @@ -82,4 +86,4 @@ Below are screen shots of various supported widgets. To see example code for a p

## Views Widget

Visit the [Views Render Array](Views/Displaying_a_View/Views_Render_Array) docs for complete details on utilizing DrupalGap's built in Views Widget. If you've never created a Views Widget in DrupalGap before, we recommend starting with the DrupalGap Views documentation page.
Visit the [Views Render Array](Views/Displaying_a_View/Views_Render_Array) docs for complete details on utilizing DrupalGap's built in Views Widget. If you've never created a Views Widget in DrupalGap before, we recommend starting with the DrupalGap Views documentation page.

0 comments on commit c3fba85

Please sign in to comment.