Skip to content

Commit 45efc2f

Browse files
committed
version 0.4.4
1 parent 20e23ec commit 45efc2f

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

changelog.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
[
2+
{
3+
"version": "0.4.4",
4+
"downloadUrl": "https://github.com/engram-design/SuperTable/archive/0.4.4.zip",
5+
"date": "2016-02-29 13:45:00",
6+
"notes": [
7+
"[Fixed] Fixed issue with rows not displaying correctly for Static Field option."
8+
]
9+
},
210
{
311
"version": "0.4.3",
412
"downloadUrl": "https://github.com/engram-design/SuperTable/archive/0.4.3.zip",

supertable/fieldtypes/SuperTableFieldType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,10 @@ public function getSearchKeywords($value)
359359
$keywords = array();
360360
$contentService = craft()->content;
361361

362+
if ($this->settings->staticField) {
363+
$value = array($value);
364+
}
365+
362366
foreach ($value as $block) {
363367
$originalContentTable = $contentService->contentTable;
364368
$originalFieldColumnPrefix = $contentService->fieldColumnPrefix;

supertable/templates/rowInput.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
{% set totalNewBlocks = 0 %}
1010

1111
{% if settings.staticField %}
12-
{% set blocks = [blocks] %}
12+
{% if blocks %}
13+
{% set blocks = [blocks] %}
14+
{% endif %}
1315
{% endif %}
1416

1517
{% for block in blocks %}

supertable/templates/tableInput.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
{% set totalNewBlocks = 0 %}
2727

2828
{% if settings.staticField %}
29-
{% set blocks = [blocks] %}
29+
{% if blocks %}
30+
{% set blocks = [blocks] %}
31+
{% endif %}
3032
{% endif %}
3133

3234
{% for block in blocks %}

0 commit comments

Comments
 (0)