Please refer to this thread for information leading up to this problem.
I am having problems with mass file uploads, the files will upload in my CP for craft, and be present on the assets list, however when I come to post the entry, only one image will show on my live page.
Here is my code:
{% extends "_layout/_layout" %}
{% set bodyClass = "photos" %}
{% block metaTitle %}{{ entry.title }} Photo Gallery{% endblock %}
{% block metaDescription %}{{ entry.metaDescription }}{% endblock %}
{% block content %}
<div class="container">
<div class="page-title-heading">
<h1>{{ entry.title }}</h1>
</div>
</div>
<div class="title-border"></div>
<div class="portfolio-container">
{{ entry.body }}
<ul id="portfolio-items-one-fourth" class="portfolio-items-one-fourth clearfix">
{% set photos = entry.photos %}
{% if photos | length %}
{% for photo in photos %}
<li class="item photo" style="display: inline-block; opacity: 1;">
<div class="item-content">
<div class="link-holder">
<div class="portfolio-item-holder">
<div class="portfolio-item-hover-content">
{% set image = photo.uploadPhoto.first() %}
<a href="{{ image.getUrl('photoLightbox') }}" class="fancybox" rel="gallery" title="{{ photo.photoCaption }}">
<img src="{{ image.getUrl('photoListing') }}" width="270" class="portfolio-img">
</a>
</div>
</div>
</div>
</div>
</li>
{% endfor %}
{% endif %}
</ul>
</div>
<p class="next-prev gallery-links">
{% set prev = entry.getPrev({'section' : entry.section.handle}) %}
{% set next = entry.getNext({'section' : entry.section.handle}) %}
{% if prev %}<a href="{{ prev.url }}">« {{ prev }}</a>{% endif %}
{% if next %}<a href="{{ next.url }}">{{ next }} »</a>{% endif %}
</p>
<p class="photo-credits gallery-links">
<a href="/photo-credits">Photographer credits</a>.
</p>
{% endblock %}
Any help with rectifying this code would be absolutely wholeheartedly appreciated!
Thank you!
entry.photos
a Matrix field or an Assets field?