Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include static html in php/smarty

I have been asked to include some html snippet in this php/smarty page. It's basically a sales agreement at the end of an overview page before you pay.

What is the code to include static html into my php/smarty template?

Thanks...

like image 582
Kyle Avatar asked Dec 28 '22 19:12

Kyle


1 Answers

Do you mean include a file containing static HTML?

{include file="htmlfile.html"}

edit

As the file is just HTML, it might be better to use {fetch}, e.g.

{fetch file="path/to/html/file.html"}

For local files, either a full system file path must be given, or a path relative to the executed php script.

like image 138
Tom Haigh Avatar answered Dec 31 '22 13:12

Tom Haigh