hi everyone,
I’ve just started using the gallery module and am having a problem - I was wondering if anybody can help?
I’ve got a ‘whos who’ page that shows an image, and short bio about each staff member. The images are held in a gallery called ‘staff_images’ and the ‘who’s who’ publish page has a custom image entry field with a relationship to the staff_images gallery.
Using the code shown below to show each entry, the rendered html is showing the same image for every entry (defaulting to the last image submitted to the gallery) as opposed to the correct image selected in the dropdown relationship in the publish page. However, the alt tag is working as expected and correctly displays the different {title} for each entry.
The rendered html is shown below (i’ve cut it at two entries) - notice the alt tag changing correctly but the image src remaining the same..
I have a feeling I’m missing something fundamental, but have read and re-read the docs and had a search on the forums and have so far missed the solution!
EE CODE:
{exp:weblog:entries weblog="whos_who" sort="asc"}
<dl class="{switch="main_column_a|main_column_b">
{exp:gallery:entries gallery="staff_images"}
<dd class="shadow_w">{image_url}</dd>
{/exp:gallery:entries}
<dt class="header_e">{title}</dt>
<dd class="header_g">{staff_position}</dt>
<dd>{staff_desc}</dd>
</dl>
{/exp:weblog:entries}RENDERED HTML:
<dl class="main_column_a">
<dd class="shadow_w">http://localhost:8888/images/staff/sarah.jpg</dd>
<dt class="header_e">Sarah Robson</dt>
<dd class="header_g">Research and Planning Director</dt>
<dd>Lant vel utat. Ut niam veliqui euisim zzrilit adio dolent irit nullut aut irit amet am dunt lorper si bla consequis nonsent laore min ercing eu feu faccum vulputet lore feugait am del ulla augueriusci blaore dolorem zzril ing ent wis er alit, coreSenim zzrilluptat wisit autpat. Ut praesed et ad dolortis adiametueros dunt vel ipismolore enisi exerostrud miniam ipit.</dd>
</dl>
<dl class="main_column_b">
<dd class="shadow_w">http://localhost:8888/images/staff/sarah.jpg</dd>
<dt class="header_e">Kevin Lavery</dt>
<dd class="header_g">Trading Division Director</dt>
<dd>Lant vel utat. Ut niam veliqui euisim zzrilit adio dolent irit nullut aut irit amet am dunt lorper si bla consequis nonsent laore min ercing eu feu faccum vulputet lore feugait am del ulla augueriusci blaore dolorem zzril ing ent wis er alit, coreSenim zzrilluptat wisit autpat. Ut praesed et ad dolortis adiametueros dunt vel ipismolore enisi exerostrud miniam ipit.</dd>
</dl>Mod note- glad you got it squared- so I won’t reply and bump you to the top! - r