Skip to content

Commit 1391e64

Browse files
committed
Reveal additional FC content regions
1 parent 943cbd6 commit 1391e64

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

core/model/schema/modx.action.fields.schema.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
<tab name="modx-resource-content">
2626
<field name="modx-resource-content" />
2727
</tab>
28+
<tab name="modx-resource-content-above" />
29+
<tab name="modx-resource-content-below" />
2830
<tab name="modx-resource-main-right">
2931
</tab>
3032
<tab name="modx-resource-main-right-top">

core/src/Revolution/modActionDom.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,21 @@ public function apply($objId = '')
3939
$ruleType = $this->get('rule');
4040

4141
$container = json_encode($this->get('container'));
42-
$itemId = json_encode($this->get('name'));
42+
$itemId = $this->get('name');
43+
$value = $this->get('value');
44+
45+
/** Backward compat: Support for legacy tab ids for above/below content regions */
46+
foreach (['itemId', 'value'] as $identifier) {
47+
$$identifier = in_array($$identifier, ['modx-content-above', 'modx-content-below'])
48+
? str_replace('modx-', 'modx-resource-', $$identifier)
49+
: $$identifier
50+
;
51+
}
52+
53+
$itemId = json_encode($itemId);
4354
$value = in_array($ruleType, $boolRules)
4455
? (int)$this->get('value')
45-
: json_encode(htmlspecialchars($this->get('value'), ENT_COMPAT, $encoding))
56+
: json_encode(htmlspecialchars($value, ENT_COMPAT, $encoding))
4657
;
4758

4859
switch ($ruleType) {

manager/assets/modext/widgets/resource/modx.panel.resource.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ Ext.extend(MODx.panel.Resource,MODx.FormPanel,{
10451045
,autoHeight: true
10461046
,hideMode: 'offsets'
10471047
,items: [{
1048-
id: 'modx-content-above'
1048+
id: 'modx-resource-content-above'
10491049
,border: false
10501050
},{
10511051
xtype: 'textarea'
@@ -1057,7 +1057,7 @@ Ext.extend(MODx.panel.Resource,MODx.FormPanel,{
10571057
,grow: false
10581058
,value: (config.record.content || config.record.ta) || ''
10591059
},{
1060-
id: 'modx-content-below'
1060+
id: 'modx-resource-content-below'
10611061
,border: false
10621062
}]
10631063
};

0 commit comments

Comments
 (0)