diff --git a/administrator/language/en-GB/en-GB.plg_content_fields.ini b/administrator/language/en-GB/en-GB.plg_content_fields.ini
index 7d14d5ce45dc7..2186f59c3c2a0 100644
--- a/administrator/language/en-GB/en-GB.plg_content_fields.ini
+++ b/administrator/language/en-GB/en-GB.plg_content_fields.ini
@@ -4,4 +4,4 @@
; Note : All ini files need to be saved as UTF-8
PLG_CONTENT_FIELDS="Content - Fields"
-PLG_CONTENT_FIELDS_XML_DESCRIPTION="This plugin allows you to display a custom field which has been inserted with the 'Button - Fields' plugin or using Syntax: {field #} directly into the editor area."
+PLG_CONTENT_FIELDS_XML_DESCRIPTION="This plugin allows you to display a custom field which has been inserted with the 'Button - Fields' plugin or using Syntax: {field #} directly into the editor area.
Possible Syntax:
{field 1}
will display the field with the ID 1{field 1,foo}
will display the selected field using the alternative layout 'foo'.{fieldgroup 2}
will display all fields within the fieldgroup with the ID 2.
"
diff --git a/plugins/content/fields/fields.php b/plugins/content/fields/fields.php
index ee801973e03a6..4e4922839f966 100644
--- a/plugins/content/fields/fields.php
+++ b/plugins/content/fields/fields.php
@@ -79,9 +79,12 @@ public function onContentPrepare($context, &$item, &$params, $page = 0)
foreach ($matches as $i => $match)
{
- // $match[0] is the full pattern match, $match[1] is the type (field or fieldgroup) and $match[2] the ID
- $id = (int) $match[2];
- $output = '';
+ // $match[0] is the full pattern match, $match[1] is the type (field or fieldgroup) and $match[2] the ID and optional the layout
+ $explode = explode(',', $match[2]);
+ $id = (int) $explode[0];
+ $layout = !empty($explode[1]) ? trim($explode[1]) : 'render';
+ $output = '';
+
if ($match[1] == 'field' && $id)
{
@@ -89,7 +92,7 @@ public function onContentPrepare($context, &$item, &$params, $page = 0)
{
$output = FieldsHelper::render(
$context,
- 'field.render',
+ 'field.' . $layout,
array(
'item' => $item,
'context' => $context,
@@ -114,7 +117,7 @@ public function onContentPrepare($context, &$item, &$params, $page = 0)
{
$output = FieldsHelper::render(
$context,
- 'fields.render',
+ 'fields.' . $layout,
array(
'item' => $item,
'context' => $context,