@@ -76,7 +76,9 @@ public function setConfig(array $config = array(), $clean_timings = true) {
76
76
$ this ->config ['scheme ' ] = $ this ->modx ->getOption ('link_tag_scheme ' );
77
77
}
78
78
$ this ->config ['useFenom ' ] = $ this ->modx ->getOption ('pdotools_fenom_default ' , null , true );
79
+ $ this ->config ['useFenomParser ' ] = $ this ->modx ->getOption ('pdotools_fenom_parser ' , null , false );
79
80
$ this ->config ['useFenomCache ' ] = $ this ->modx ->getOption ('pdotools_fenom_cache ' , null , false );
81
+ $ this ->config ['useFenomMODX ' ] = $ this ->modx ->getOption ('pdotools_fenom_modx ' , null , false );
80
82
}
81
83
82
84
@@ -313,8 +315,8 @@ public function getChunk($name = '', array $properties = array(), $fastMode = fa
313
315
}
314
316
315
317
$ content = $ this ->config ['useFenom ' ]
316
- ? $ this ->fenom ($ chunk , $ properties )
317
- : $ content = $ chunk ['content ' ];
318
+ ? $ this ->fenom ($ chunk[ ' content ' ] , $ properties )
319
+ : $ chunk ['content ' ];
318
320
319
321
if (strpos ($ content , '[[ ' ) !== false ) {
320
322
// Processing quick placeholders
@@ -386,8 +388,8 @@ public function parseChunk($name = '', array $properties = array(), $prefix = '[
386
388
}
387
389
388
390
$ content = $ this ->config ['useFenom ' ]
389
- ? $ this ->fenom ($ chunk , $ properties )
390
- : $ content = $ chunk ['content ' ];
391
+ ? $ this ->fenom ($ chunk[ ' content ' ] , $ properties )
392
+ : $ chunk ['content ' ];
391
393
392
394
if (strpos ($ content , '[[ ' ) !== false ) {
393
395
$ pl = $ this ->makePlaceholders ($ properties , '' , $ prefix , $ suffix );
@@ -464,7 +466,7 @@ public function fenom($chunk, array $properties = array()) {
464
466
465
467
if ($ tpl instanceof Fenom \Render) {
466
468
$ properties ['_pls ' ] = $ properties ;
467
- if ($ this ->modx -> getOption ( ' pdotools_fenom_modx ' , null , true )) {
469
+ if (! empty ( $ this ->config [ ' useFenomMODX ' ] )) {
468
470
$ properties ['modx ' ] = $ this ->modx ;
469
471
$ properties ['pdoTools ' ] = $ this ;
470
472
}
0 commit comments