I'm having a bit of an issue in repurposing a functioning template of mine. I have a {exp:stash:set}
and {stash:get tag}
, both of which worked on the previous template, but on this new template which is on a Structure page one segment deeper, I seem to be having problems with the {exp:stash:get}
not returning anything, though the set tag works just fine with output='yes'
set.
The code in question:
{exp:stash:set name="segment_entry" type='snippet' parse_tags="yes"}
{exp:playa:parents url_title="{freebie_6}" channel="segment_discussions"}
{entry_id}
{/exp:playa:parents}
{/exp:stash:set}
{exp:channel:entries
channel="segment_discussions"
disable="categories|category_fields|member_data|pagination|trackbacks"
limit="1"
entry_id="{exp:stash:get name='segment_entry' type='snippet'}"
parse="inward"
}
I’ve tested to see if the problem was the get tag being inside of the {exp:channel:entries}
tag, but unfortunately, that doesn't seem to have any effect. Is there anything else I’m missing that could cause this to no longer function? channel name obviously is correct, as I previously mentioned that output='yes'
was working just fine.
For reference, here is the whole template, with content of other switchee cases removed:
{if logged_out}{redirect="account/login"}{/if}
{if group_id == '4'}{redirect="account/pending"}{/if}
{exp:switchee variable="{freebie_4}" parse="inward"}
{case default="yes"}
[[Unrelated Content]]
{/case}
{case value="discussion"}
{switchee variable="{freebie_5}" parse="inward"}
{case value="thread"}
{embed="embeds/_header"}
{exp:stash:set name="segment_entry" type='snippet' parse_tags="yes"}
{exp:playa:parents url_title="{freebie_6}" channel="segment_discussions"}
{entry_id}
{/exp:playa:parents}
{/exp:stash:set}
{exp:channel:entries
channel="segment_discussions"
disable="categories|category_fields|member_data|pagination|trackbacks"
limit="1"
entry_id="{exp:stash:get name='segment_entry' type='snippet'}"
parse="inward"
}
<section class="unit">
{embed="unit/_navigation"}
</section>
<section class="discussion">
<div class="main-content">
<header>
<h3>DISCUSSION: {title}</h3>
<h4>{comment_total} Comment{if comment_total <> 1}s{/if}</h4>
</header>
<article>
{segment_discussion_body}
{exp:channel_files:files entry_id="{entry_id}"}
{if file:count == "1"}<ul>{/if}
<li>{file:title}: <a href="{file:url}">{file:filename} ({file:filesize})</a></li>
{if file:count == file:total}</ul>{/if}
{/exp:channel_files:files}
</article>
</div>
{/exp:channel:entries}
<div class="discussion-items">
</div> <!-- discussion-items -->
</section>
{embed="embeds/_footer"}
{/case}
{/switchee}
{/case}
{/exp:switchee}
type="snippet"
and or addedprocess="end"
to the get? – Natetronn Jan 30 '13 at 3:26