Skip to content

Commit

Permalink
Released v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamminf committed May 11, 2016
1 parent 50d0f76 commit d909dce
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Changelog

#### v1.0.2
- `Added` Added ability to get child blocks in the template. This implementation will be deprecated soon in a later release but will remain supported throughout all 1.x versions.

#### v1.0.1
- `Added` Added ability to query against block level in templates, like with categories and structure sections

Expand Down
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,35 @@ Neo is a [Craft CMS](https://craftcms.com) field type that builds upon the conce

## Release

Version `1.0` is out baby! [Grab your copy today](https://github.com/benjamminf/craft-neo/archive/1.0.1.zip). Will update this README in the coming days with a complete presentation of the plugin.
Version `1.0` is out baby! [Grab your copy today](https://github.com/benjamminf/craft-neo/archive/1.0.2.zip). Will update this README in the coming days with a complete presentation of the plugin.

## Template usage

```twig
<ol>
{% for block in entry.neoField.level(1) %}
<li>{{ block.type }}
{% if craft.neo.hasChildren(block) %}
<ol>
{% for childBlock in craft.neo.children(block) %}
<li>{{ childBlock.type }}</li>
{% endfor %}
</ol>
{% endif %}
</li>
{% endfor %}
</ol>
```

Or use the `{% nav %}` tag to recursively generate a Neo field structure:
```twig
<ol>
{% nav block in entry.neoField %}
<li>{{ block.type }}
{% ifchildren %}
<ol>{% children %}</ol>
{% endifchildren %}
</li>
{% endnav %}
</ol>
```
2 changes: 1 addition & 1 deletion neo/NeoPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function getDescription()

public function getVersion()
{
return '1.0.1';
return '1.0.2';
}

public function getCraftMinimumVersion()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "craft-neo",
"version": "1.0.1",
"version": "1.0.2",
"description": "A Matrix-like field type that uses existing fields",
"main": "webpack.config.js",
"scripts": {
Expand Down

0 comments on commit d909dce

Please sign in to comment.