Afficher un champ file

More
11 years 3 months ago #32942 by yopyop001
Replied by yopyop001 on topic Afficher un champ file
Bonjour,

Je déterre un post un peu vieux, mais si cela peut-être utile à quelqu'un et éventuellement être une option du champs 'File' :

Dans le plugin flexicontent (plugins/flexicontent_fields/file.php)

En ajoutant à la fin de la fonction onDisplayFieldValue le code :
Code:
$field->url = $dl_link;

On peut récupérer le lien en utilisant
Code:
$this->item->fields["field_name"]->url
dans le template

A plus tard

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #32944 by ggppdk
Replied by ggppdk on topic Afficher un champ file
Thanks, yopyop001
i ll add this variable 'url', but note it will be an array since file is multi-value.

The best place to add this is just after:
Code:
$field->{$prop}[] = $pretext . $str . $posttext;
add this (note the [] to make url variable an array since file field is multi-value)
Code:
$field->url[] = $dl_link;

and then inside use:
...->url[0]


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.248 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline