Jump to content

Name of attached file in Pages


Meddysong

Recommended Posts

Posted

If you use an upload field in Pages and display the field using one of the native options, you get the result $label: $value ($value2 $value3...)

Untitled-1.thumb.jpg.db30b1ee33ab225a97d3ce7345204314.jpg

I want to use a custom field with mine. I'm doing OK using:

{{foreach $value as $attachment}}
<span class="ipsBadge ipsBadge_style2 ipsMargin_right_tiny ipsPos_right"><a href="{file='$attachment' extension='cms_Records'}">$attachment</a></span>
{{endforeach}}

Unfortunately, I'm not getting the attachment name with that:

Untitled-1.thumb.jpg.782783cc08b6ea72ef027de3b2d442e5.jpg

$value just produces an 'Array' and $attachment->name and $attachment->title aren't producing anything. How do I get the name of the attachment, eg certificate.pdf?

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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