concept page in category php

appears as: page, pages, pages, page, A page
Zend Framework in Action

This is an excerpt from Manning's book Zend Framework in Action.

We live in a multicultural world with multiple languages, so Zend Framework provides a rich set of functionality for localizing your applications to match your target users. This covers minor issues, like ensuring that the correct currency symbol is used throughout, to full support for changing all the text on the page to the correct language. Date and time routines are also provided with a simple, object-oriented interface, as are settings for the many ways that a calendar can be displayed.

Figure 2.1. Zend Framework’s Front Controller and MVC components work together to serve a web page. The router and dispatcher find the correct controller, which builds the page in conjunction with the model and view.

The Zend_Pdf_Page::SIZE_A4 argument used here uses a constant to define what size and orientation we want the page to be. Table 16.1 shows the available predefined constants, together with their measurements.

PHP in Action: Objects, Design, Agility

This is an excerpt from Manning's book PHP in Action: Objects, Design, Agility.

There is no doubt that PHP is a popular web programming language, at least in the sense of being heavily used. Studying the URLs of pages you visit on the Web should be enough to demonstrate that. There has to be a reason for this popularity. Some commercial products may gain popularity through massive marketing efforts, but PHP clearly is not among them.

A complex web page is like a zoo. There may be all sorts of different creatures, all with different habits and requiring different care, cleaning, and feeding. Some of them are in cages (typically the stuff that surrounds the main content, such as banners, ads, menus, and various kinds of sidebars); some of them range freely on the main expanse of the page.

14.3.1. Making print-friendly versions of pages

Complex layouts are not well-suited for printing. That’s why many sites have the ability to display “printable,” “print-friendly,” or “printer-friendly” versions of pages, particularly articles and others that have a great deal of text.

Here, we’ll take the slightly more powerful and complex route of controlling part of the layout from PHP by using a different template for printing. Creating a print-friendly layout will be a test to make sure our layout flexibility really works. What we need to do is to create another layout page that is more appropriate for a printout. Figure 14.4 shows how such a layout might look in a browser. The menu is not needed for a printout, so we remove that altogether. And sidebars often cause problems with printing, so we’ll just move the news list on the right side so it’s right at the beginning of the page.

Figure 14.4. Print-friendly page layout. We have removed the menu and moved the news from the right-hand side of the page to the beginning.