dynamically changing a link reference
Am not really sure how to explain this but here goes:
On a clients site, I have created a testimonials pag and am using a recordset to draw the relevant info from the database to display for the relevant testimonial.
Part of each testimonial includes a modal to pop up the actual testimonial.
What I am struggling to achieve is, if I am using a repeat region using 2 or more records, then the pop up 'breaks'
The pop up when using just one record is fine and looks like this:
<a class="poplight" href="#?w=700" rel="popupreference">testimonial</a>
which then displays the following
<div class="popup_block" id="popupreference">Content to go here</div>
What I have been trying to do is to use the content value from the database to dynamically change the 'popupreference' bit using the Content Value from 'Popup Name' eg,
<a class="poplight" href="#?w=700" rel="<?php include('WA_CMS/addtosite.php'); echo str_replace(array("<p>","</p>"),"",WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'Clients', 'Popup Name', false, $row_ClientsRS['ContentPageSetOrder'])); ?>">testimonial</a></div>
<div class="popup_block" id="<?php include('WA_CMS/addtosite.php'); echo str_replace(array("<p>","</p>"),"",WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'Clients', 'Popup Name', false, $row_ClientsRS['ContentPageSetOrder'])); ?>">Content to go here</div>
Is it possible to achieve what I am trying to do uising this method and if so, what am I doing wrong please?
Thanks
Jamie