Skip to content

Instantly share code, notes, and snippets.

@fitzhaile
Forked from jchristopher/gist:4217483
Created February 12, 2013 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitzhaile/4772341 to your computer and use it in GitHub Desktop.
Save fitzhaile/4772341 to your computer and use it in GitHub Desktop.
<?php $attachments = new Attachments( 'attachments' ); ?>
<?php if( $attachments->exist() ) : ?>
<h3>Attachments</h3>
<ul>
<?php while( $attachments->get() ) : ?>
<li>
ID: <?php echo $attachments->id(); ?><br />
Type: <?php echo $attachments->type(); ?><br />
Subtype: <?php echo $attachments->subtype(); ?><br />
URL: <?php echo $attachments->url(); ?><br />
Image: <?php echo $attachments->image( 'thumbnail' ); ?><br />
Source: <?php echo $attachments->src( 'full' ); ?><br />
Size: <?php echo $attachments->filesize(); ?><br />
Title Field: <?php echo $attachments->field( 'title' ); ?><br />
Caption Field: Name: <?php echo $attachments->field( 'caption' ); ?>
</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment