I have a channel named Bios that has six fields of information per person. I want to dynamically generate a bootstrap modal with the selected person’s bio info when their photo is selected from a page. I see I can hard code it for a single person using entry_id but is there any way else to pull the correct data without resorting to making a template for each person and using the URL segment variables?
This is my first time working with ExpressionEngine for a site build. I tested it out using entry_id just to make sure I was pulling the channel fields correctly:
<div class="modal" id="bioModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header text-blue">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
{exp:channel:entries channel="bios" entry_id="9"}
<img src="{bio_photo}" class="bio-photo img-responsive" alt="bio photo">
<div class="bio-header">
<h4 class="modal-title">{bio_name}</h4>
<h5 class="modal-title">{job_title}</h5>
</div>
</div>
<div class="modal-body text-black">
<p class="bio-details">{bio_details}</p>
</div>
{/exp:channel:entries}
<div class="modal-footer">
<a href="#" data-dismiss="modal" class="btn">Close</a>
</div>
</div>
</div>
</div>