rlandster
rlandster

Reputation: 7825

Using symfony layouts outside of view

I want to create a custom ./config/unavailable.php page using the layouts and styling used by the rest of my application. I could just copy the generated HTML that one of these pages renders, but then if I ever change the layout or style I would have to re-copy.

How can I render the unavailable.php page the same way I render the views?

I am using symfony 1.4.

Upvotes: 2

Views: 133

Answers (2)

Tom
Tom

Reputation: 30698

I'd suggest keeping it as manual HTML, a simple page. Whatever you need to do to copy over layouts/templates (which contain stuff that Symfony needs to execute to generate) isn't worth unless you plan having your app unavailable for most of the time. It's just easier to copy things over manually if you ever decide to make big CSS changes.

Upvotes: 0

greg0ire
greg0ire

Reputation: 23255

unavailable.php is called when symfony is busy clearing its cache. You might want not to disturb it too much at this moment, that's why plain php is used. Copying html could be done by a cron task though, so if I were you I would try to combine cron, wget and sed to achieve this.

Upvotes: 1

Related Questions