EE 2.5.5 Stash 2.1.0
I'm new to stash and am in the middle of integrating EE into existing html code.
The code I currently have is as follows:
{exp:stash:set parse_tags="yes"}
{stash:content}
{exp:channel:entries channel="photoblog" limit="15" orderby="" disable="member_data|pagination|categories"}
{stash:title}
<div {if count=="1"}style="display:block;"{/if}>
<h2>{title}</h2>
</div>
{/stash:title}
{stash:photos}
{photos}
<img class="pg_thumb" {if count=="1"}style="display:block;"{/if} src="{image}" width="1000" height="714" alt="" />
{/photos}
{/stash:photos}
{stash:description}
<div {if count=="1"}style="display:block;"{/if}>
{description}
<a href="#" class="more">Details</a>
</div>
{/stash:description}
{/exp:channel:entries}
{/stash:content}
{/exp:stash:set}
<div id="pg_preview">
{exp:stash:get name="photos"}
</div>
<div id="pg_desc1" class="pg_description">
{exp:stash:get name="title"}
</div><!--pg_desc1-->
<div id="pg_desc2" class="pg_description">
{exp:stash:get name="description"}
</div><!--pg_desc2-->
This is sort of working. When I check the front end code I see only one result for each of the get tags when I'm actually expecting to see 15 as per the limit parameter of the channel entries tag.
UPDATE
I just tried the following, but all it does is output about 30 blank lines
{exp:channel:entries channel="photoblog" limit="15" orderby="" disable="member_data|pagination|categories"}
{exp:stash:set_list name="photos-list" parse_tags="yes"}
{stash:entry_id}{entry_id}{/stash:entry_id}
{stash:title}
{title}
{/stash:title}
{stash:photos}
{photos}
<img class="pg_thumb" {if count=="1"}style="display:block;"{/if} src="{image}" width="1000" height="714" alt="" />
{/photos}
{/stash:photos}
{stash:description}
{description}
{/stash:description}
{/exp:stash:set_list}
{/exp:channel:entries}
{exp:stash:get_list name="photos-list" orderby="entry_id" sort="asc" limit="15"}
<div id="pg_preview">
{photos}
</div>
<div id="pg_desc1" class="pg_description">
<div {if count=="1"}style="display:block;"{/if}>
<h2>{title}</h2>
</div>
</div><!--pg_desc1-->
<div id="pg_desc2" class="pg_description">
<div {if count=="1"}style="display:block;"{/if}>
{description}
<a href="#" class="more">Details</a>
</div>
</div><!--pg_desc2-->
{/exp:stash:get_list}
UPDATE 2
I changed the code that was here just before reading dylans comment, which looks the same to me, but it isn't working.
{exp:stash:set_list name="photos-list" parse_tags="yes" output="no"}
{exp:channel:entries channel="photoblog" limit="5" orderby="" disable="member_data|pagination|categories"}
{stash:entry_id}{entry_id}{/stash:entry_id}
{stash:title}
{title}
{/stash:title}
{stash:photos}
{photos}
<img class="pg_thumb" {if count=="1"}style="display:block;"{/if} src="{image}" width="1000" height="714" alt="{title}" />
{/photos}
{/stash:photos}
{stash:description}
{description}
{/stash:description}
{/exp:channel:entries}
{/exp:stash:set_list}
{exp:stash:get_list name="photos-list" orderby="entry_id" sort="asc" limit="5" output="yes"}
<div id="pg_preview">
{photos}
</div>
<div id="pg_desc1" class="pg_description">
<div {if count=="1"}style="display:block;"{/if}>
<h2>{title}</h2>
</div>
</div><!--pg_desc1-->
<div id="pg_desc2" class="pg_description">
<div {if count=="1"}style="display:block;"{/if}>
{description}
<a href="#" class="more">Details</a>
</div>
</div><!--pg_desc2-->
{/exp:stash:get_list}
UPDATE 3
Newly revised code below based on Nate's comment to his own answer. Not working as expected. I still only see one entry worth of data, but the image is now not the correct one. Have created a stripped down template with only the following code for testing purposes which can be viewed here. That picture is from December but the copy is from Feb 8. Not sure why the photo is not pulling from the same entry as the copy.
--updated to stash 2.3.6 and multiple entries now working, but the same image is displaying for all of them.
{exp:stash:set_list name="photos-list" parse_tags="yes" output="no" parse_depth="2" parse_conditionals="yes" prefix="prefix"}
{exp:channel:entries channel="photoblog" limit="5" orderby="" disable="member_data|pagination|categories" dynamic="no"}
{stash:entry_id}{entry_id}{/stash:entry_id}
{stash:title}
{title}
{/stash:title}
{exp:stash:set_list:nested name="photos-image" parse_tags="yes" output="yes" parse_conditionals="yes" prefix="prefix"}
{stash:picture}
{photos}
<img class="pg_thumb" {if prefix:count=="1"}style="display:block;"{/if} src="{image}" width="1000" height="714" alt="{title}" />
{/photos}
{/stash:picture}
{/exp:stash:set_list:nested}
{stash:description}
{description}
{/stash:description}
{/exp:channel:entries}
{/exp:stash:set_list}
{exp:stash:get_list name="photos-list" orderby="entry_id" sort="asc" limit="5" output="yes" parse_conditionals="yes" prefix="prefix"}
<div id="pg_preview">
{exp:stash:get_list:nested name="photos-image"}
{picture}
{/exp:stash:get_list:nested}
</div>
<div id="pg_desc1" class="pg_description">
<div {if prefix:count=="1"}style="display:block;"{/if}>
<h2>{title}</h2>
</div>
</div><!--pg_desc1-->
<div id="pg_desc2" class="pg_description">
<div {if prefix:count=="1"}style="display:block;"{/if}>
{description}
<a href="#" class="more">Details</a>
</div>
</div><!--pg_desc2-->
{/exp:stash:get_list}
Please advise.
UPDATE AGAIN
Am very flummoxed with this. I have pasted template code here that works perfectly, but is using 4 duplicate channel entries tags. If someone could help me get this working with stash I would be very grateful. It would also help if I can not just copy and paste, but fully understand what is happening.