in phalcon project
view file struct
view ----index.volt ----layouts --------test.volt ----test --------test.volt ----shared --------header.volt
in index.volt
{{ partial ("shared/header")}}
<body>
index.content
{{content()}}
</body>
</html>
in shared/header.volt
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Keywords" content="">
<meta name="Description" content="">
<link rel="stylesheet" href="css/global.css" />
{% block csshead %}
{% endblock %}
</head>
in layouts/test.volt
test controller
{{content()}}
in test/test.volt
testController.testAction
{{content()}}
i want use block csshead in test/test.volt, because i want add css in html head tag. not in html center, not like this:
<link rel="stylesheet" href="css/testController_testAction.css" />
testController.testAction
{{content()}}
i know ,i can like this: view file struct like this:
viewsdir: ----test --------test.volt ----shared --------main.volt
in test.volt
{% extends "shared/main.volt" %}
{% block csshead %}
<link rel="stylesheet" href="css/testController_testAction.css" />
{% endblock %}
testController.testAction
{{content()}}
i don't like this way. have other way to association?