Jump to content

how to retrieve URL and Description from Input field Files


Recommended Posts

Posted

Sorry this is a stupid beginner question. Already triedthe whole morning to find a solution.

I need to output the Name of the descriptions as well as generating the link to the file.

<p class="tripFlyer"><a href="" target="_blank" title="<?php echo $page->reise_flyer;?>"><?php echo $fields->get("reise_flyer")->label;?></a></p>
 
 
I manage to call the label, but I do not get the Description. So with the URL. Have not managed to get the url of the file.
 
Your help is much appreciated!
Posted

Greetings,

Assuming "reise_flyer" is an uploaded file, just do this:

<a href="<?php echo $page->reise_flyer->url;?>" target="_blank"><?php echo $fields->get("reise_flyer")->label;?></a>

Thanks,

Matthew

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...