embed embed share link link comment comment
Embed This Video close
Share This Video close
bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark
embed test
Rate This Video embed
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Tags For This Video tags
rate rate tags tags related related lights lights

Managing New Design Blocks.

A Block is basically a data resource for Views. It uses the sites Models, grabs the data, makes any necessary adjustments, and then makes that data available to a View. For instance, when you override / create a Block that calls a product collection, that product collection is pulling some products’ data from a Model. The Block is where you create such a product collection and implement the product collection’s methods, such as adding filters or ordering the products in a certain way. That product collection is then made available to your View so you can display the products on a page.

 

The Application uses templates and shapes to build views. Templates are conceptually similar to partial views in application MVC, and they provide the basic structure for rendering shape data in a page. A template can contain web page content such as HTML markup, CSS styles, and JavaScript code to help render shape data. In addition, a template can contain server-code blocks so that you can access and render shape data in a web page. Shapes are dynamic data models that represent content structures such as menus, menu items, content items, documents, and messages. Shapes provide the data for dynamic views (as opposed to the static views in MVC) that templates render at run time.

The view engine is responsible for parsing the template and rendering the shape data into a web page. The default view engine for our Web application is the zend view engine, which is processed by Zend Partial view helper.

 

The Partial view helper is used to render a specified template within its own variable scope. The primary use is for reusable template fragments with which you do not need to worry about variable name clashes. Additionally, they allow you to specify partial view scripts from specific modules.

Leave a Reply