I have this site I've been working on here: http://www.replyonline.co.uk/DirectionGroup/xmas/index.php
When you hover over the first photo at the top, a voting box appears. Now if you click on the photo it displays the 'By whom' name and 2 numbers (the vote results). Both the photo thumbnail and the enlarged lightbox share the same HTML content as each other.
What I don't understand is why the enlarged box doesn't display the HTML properly, just the 2 numbers from the voting element rather than the voting element itself.
Here is an example of what the markup is for each thumbnail you click:
<a href="#"><img src="images/thumbs/1.jpg" data-largesrc="images/large/1.jpg" alt="image01"/><span>By Tim Morgan <?php echo ThumbsUp::item('1')->template('thumbs_up_down') ?></span></a>
As you can see, there is the thumb source and the large source as well as the voting function.
preguntado el 08 de noviembre de 11 a las 12:11
It turns out you have to set HTML with the
.html method - currently you're converting the whole to text and then setting text.
Secondly, it looks like
.tmpl does not like HTML. If you also set the HTML the first time (when doing
.tmpl), it should always work.