1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 06:06:45 +02:00

feat(shortcodes): update [entries] shortcode for field processor

This commit is contained in:
Awilum
2022-04-12 19:33:12 +03:00
parent 57a9ee6d1d
commit 5b2c1b40d6

View File

@@ -29,5 +29,5 @@ parsers()->shortcodes()->addHandler('entries_fetch', static function (ShortcodeI
return '';
}
return collection(entries()->fetch($s->getParameter('id')))->get($s->getParameter('field'), $s->getParameter('default'));
});
return "@type:array;" . entries()->fetch($s->getParameter('id'))->toJson();
});