diff --git a/administrator/language/en-GB/plg_fields_url.ini b/administrator/language/en-GB/plg_fields_url.ini index 68d894f5cb044..e298e2828dc74 100644 --- a/administrator/language/en-GB/plg_fields_url.ini +++ b/administrator/language/en-GB/plg_fields_url.ini @@ -8,4 +8,5 @@ PLG_FIELDS_URL_LABEL="URL (%s)" PLG_FIELDS_URL_PARAMS_RELATIVE_LABEL="Relative URLs" PLG_FIELDS_URL_PARAMS_SCHEMES_LABEL="Schemes" PLG_FIELDS_URL_PARAMS_SHOW_URL="Show URL" +PLG_FIELDS_URL_PARAMS_SHOW_NAME_LABEL="Display name" PLG_FIELDS_URL_XML_DESCRIPTION="This plugin lets you create new fields of type 'URL' in any extensions where custom fields are supported." diff --git a/plugins/fields/url/params/url.xml b/plugins/fields/url/params/url.xml index 45f32ea62b4d7..34bbfac2ca0b9 100644 --- a/plugins/fields/url/params/url.xml +++ b/plugins/fields/url/params/url.xml @@ -41,6 +41,13 @@ + + diff --git a/plugins/fields/url/tmpl/url.php b/plugins/fields/url/tmpl/url.php index 81dc67000ae42..974e79bee4dc9 100644 --- a/plugins/fields/url/tmpl/url.php +++ b/plugins/fields/url/tmpl/url.php @@ -30,6 +30,8 @@ if ($fieldParams->get('show_url', 0)) { $text = htmlspecialchars($value); +} elseif ($name = $fieldParams->get('show_name', '')) { + $text = $name; } echo sprintf(