2

I want to use smarty to return some html to a text box in the back end of my web site. I am already using smarty to render the backend itself.

Whats the best way to do this?

I'm assigning a single array to smarty in the usual way, but not sure how then to return the template.

Matthew
  • 596
  • 1
  • 8
  • 29

1 Answers1

5

To fetch the content of an template with smarty use:

$oSmartyObject->fetch('template.tpl');

It will use any variables assigned, and you can use the content as you wish.

Wesley van Opdorp
  • 14,888
  • 4
  • 41
  • 59