How to use Slots in Symfony.
Symfony Slots are ways to set simple data in one template, and have it displayed in another. It’s helpful if, for example, you want to set the Title in the layout from a controller actions view. Rather than ramble on about Symfony Slots, I’ll blast through how Slots are used [...]
Tag Archive > symfony
Symfony Slots
Symfony Admin Generator File Upload
This post is presuming that you …
have Symfony 1.2+
have models set up
have some sort of admin area set up, albeit without file uploads
This is *not* about storing file data in the database, it is about storing file *locations* in the database. The actual file data will be stored on the filesystem.
So lets get file uploads [...]
Symfony Get Raw Data from Function in Template
If you’re in a template in Symfony, and you have your output escaping enabled, one thing that bugged me was when I tried to do this:
$my_model->getMyOutput(’param1′,’param2′);
The output would be escaped – for example I’d get “<b>this is bold</b>” rather than “this is bold“. The usual $my_model->getRaw(’MyOutput’) didn’t help, as it doesn’t accept parameters (actually I [...]