Wednesday 18 June 2008 6:32:26 am
{include uri='design:page_head.tpl' enable_print=true()} would work although it defaults to enable_print=true() in the standard template so you could leave off that part. It basically adds the line <link rel="Alternate" href={concat("layout/set/print/",$site.uri.original_uri)|ezurl} media="print" title="{'Printable version'|i18n('design/standard/layout')}" />
into the head of a page.
If you have the standard website interface install have a look at the following files:
extension/ezwebin/design/ezwebin/templates/pagelayout.tpl
design/standard/templates/page_head.tpl design/standard/templates/link.tpl Pagelayout.tpl contains the include line for page_head, page_head.tpl sets the default values for enable_print and includes the link.tpl template if needed. You can make a folder for your print overrides just add the folder into the override.ini.append.php entry, such as:
[print_article]
Source=node/view/full.tpl
MatchFile=print/article.tpl
Subdir=templates
Match[class_identifier]=article
Match[layout]=print
See how the MatchFile line goes to print/article.tpl. Not sure about all the details of the layout.ini but at its most basic it allows you to view the pages with a different pagelayout template or content type by using the /layout/set/SOMETHING/pathToContent in the URL. You use layout.ini to say which pagelayout to use such as:
[minimal]
PageLayout=minimal_pagelayout.tpl
If you then went to http://somedomain/layout/set/minimal/content/view/full/2 it would use minimal_pagelayout.tpl instead of pagelayout.tpl
|