Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
View from HTML not from file?
Hello, It's possible to only pass HTML data to view rather than forge from a file?
Hello ham !
To achieve this you can create a basic view and pass content in the second param.
You want to pass html code string in quote ?
We use an extended View class in your apps so we can use a string as a template. It writes it to a temp file in the app tmp directory, and then sets that file as view template. We do this for caching and performance reasons.
Alternatively you can pass your HTML as data like
suggested, and echo the variable in your view. Make sure you don't disable encoding on your data, to avoid serious security issues.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion