While looking for a solution for a similar problem I found this thread.
I have a weblog “Projects” and I want to associate each project with a category from the “projects” gallery. I created a weblog field named “screenshots_category” which holds the id of the gallery category containing the screenshots I wish to associate with the weblog entry.
I use the following (simplified) code to display the weblog entry with it’s assigned gallery category:
{exp:weblog:entries weblog="projects" category="5" limit="3" dynamic="off"}
{title}
{description}
{exp:gallery:entries gallery="projects" category="{screenshots_category}" dynamic="off" orderby="date" sort="asc" columns="1" rows="999"}
{entries}
{row}
{entry_id}
{image_url}
<p class="navigation">
<span>{count} / {total_results}</span>
</p>
{/row}
{/entries}
{/exp:gallery:entries}
{/exp:weblog:entries}
It works to a certain degree. The image url is correct and the images are displayed but {entry_id} is equal to the weblog entry’s id, not to the image’s id. Also, {count} and {total_results} are always equal to 1, no matter how many images there are.
For testing purposes I set the gallery category id manually and deleted the {exp:weblog:entries} tag which produced the desired result, so the problem seems to be the nesting inside the weblog:entries tag.
Does anybody have a solution to this problem?
Thanks in advance