3

I used this code to display the title of k2 item. The word title in the code should be replace in order to see other output. What should I replace with in order for me to display the Content of k2 item? This is my code

<script> jQuery (document).ready(function() {
    $('#itemtest').html('<?php echo $this->item->title;?>');
    }); </script>
fadira
  • 31
  • 5

1 Answers1

0

Replace the title with introtext or fulltext if you want to display the full text. Make sure you escape the quotes using the addslashes PHP function.

So, you should have something like this:

<?php echo addslashes($this->item->introtext);?>
itoctopus
  • 4,133
  • 4
  • 32
  • 44