Edit:
Ok I think I got it now. You should add include_stylesheets()
into the head
section of your layout file:
<html>
<head>
<title>This is the title</title>
<?php include_stylesheets() ?>
</head>
<body>
<!-- ... -->
Then in your template file, you use use_stylesheet()
to add a particular stylesheet for this template:
<?php use_stylesheet('/path/to/stylesheet.css') ?>
From the API documentation:
include_stylesheets()
Prints <link>
tags for all stylesheets configured in view.yml or added to the response object.
use_stylesheet()
Adds a stylesheet to the response object.
Same for Javascript.
According to the API documentation it should still work in 1.4, sfWebResponse
still has this method:
addStylesheet ($file, $position, $options)
$file The stylesheet file
$position Position
$options Stylesheet options
Adds a stylesheet to the current web response.
At least the method exists.
What exactly is the problem? Do you get an error if you want to call that method or is the stylesheet just not added?