I want to create an override for the jcemedia field plugin.
Instead of displaying the filename, I want to display a 'fixed' title, such as, click here for cv file.
I created an override for the url field type with the following code:
/* Define a variable: Link Display, this is the 'display' that will be shown.
--> If the description is Blank, assign the web url (or stripped email) to the linkdisplay
--> If it contains a value then use that value as the link display */
if ($desc =='')
{ $linkdisplay = $value_substring;
} else
{$linkdisplay = $desc;
}
/** code that works from 10/18/2018 */
echo sprintf('<a href="https://www.joomlacontenteditor.net/%s"%s>%s</a>',
htmlspecialchars($value),
$attributes,
$linkdisplay
);
When I tried to create an override for the jce media plugin, I see that the layout is quite different. Basically I want to do the following...
1. IF it is a 'file' type field
2. IF the DESCRIPTION is NOT NULL
3. Then I want to use the 'DESCRIPTION' as the link text (not the actual file name).
Unless you have another way you would recommend doing this.
thanks,
laura