5.1 Начало работы с Zend_View Placeholders. Введение | Participants
|
- Statistics
- Participants
- Translate into Russian
- Translation result
- Translated in draft, editing and proof-reading required. Completed: 5%.
If you do not want to register an account, you can sign in with OpenID.
Getting Started Zend_View Placeholders. Introduction | 5.1 Начало работы с Zend_View Placeholders. Введение | |
In the previous chapter, we looked at primarily the Two Step View pattern, which allows you to embed individual application views within a sitewide layout. At the end of that chapter, however, we discussed some limitations: | В предыдущей главе мы, в первую очередь, рассмотрели паттерн "Двухэтапное отображение", который позволяет вставлять отдельные представления (виды) вашего приложения в макет сайта. Так же в конце той главы мы обсудили, что есть некоторые ограничения: | |
• How do you alter the page title? | ||
• How would you inject conditional scripts or stylesheets into the sitewide layout? | • Как использовать различные скрипты и таблицы стилей в макете? | |
• How would you create and render an optional sidebar? What if there was some content that was unconditional, and other content that was conditional for the sidebar? | • Как создать и отобразить дополнительную боковую панель? Что сделать, что бы там был какой-то контент, который был бы безусловным и другое содержимое, которое было бы условием для боковой панели? | |
These questions are addressed in the » Composite View design pattern. One approach to that pattern is to provide "hints" or content to the sitewide layout. In Zend Framework, this is achieved through specialized view helpers called "placeholders." Placeholders allow you to aggregate content, and then render that aggregate content elsewhere. | Эти вопросы рассматриваются в >> шаблоне проектирования "Композиционный вид" (Composite View). Одним из подходов реализации данного паттерна является передача макету сайта всего содержимого (и хинтов: прим.переводчика - не совсем понял при чем тут хинты). В Zend Framework`е это реализуется с помощью специальных помощников вида - "маркерами" (plaseholders). Маркеры позволяют обобщать содержание и выводить это обобщенное содержимое в другом месте макета. |
