Getting “parent pod” data when inside an EACH loop (pod template)
-
So here’s an excerpt from my pod template. It’s for a pod called “job-vacancy” and has a relationship field called
prescreened user
that is bidirectionally linked with theuser
(extended) pod.[each prescreeneduser]
<h3>{@user_nicename}</h3>
<div>
<a href="http://localhost/site/author/{@user_login}">
<button>View User</button>
</a>
</div>
<form method="post">
<input type="hidden" name="user_id" value="{@ID}">
<input type="hidden" name="job_vacancy_id" value="{@t.ID}">
<button type="submit" name="update_user_pod">Shortlist User</button>
</form>
[/each]I know that in this line
<input type="hidden" name="user_id" value="{@ID}">
the tag{@ID}
gives me the related user’s ID, since I’m inside theeach
loop. But in the next line, I want to get theID
of thejob-vacancy
post. Outside theeach
loop I can get it using{@ID}
but I’ve tried every combination to get it inside the loop, and can’t – –{@t.ID}
,{@d.ID}
etc. How do I get the post_id that’s outside the loop?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.