Skip to main content

UNKNOWN

Project description

Introduction

With collective.multitemplate you can register more than one template for a portlet and when adding such a portlet you can select which template to use for rendering the portlet. It’s similar to the ‘display’ menu for content.

Usage

A portlet needs to support collective.multitemplate by using collective.multitemplate.portlet.Assignment as the base class for assignments and use collective.multitemplate.portlet.ViewMultiTemplate by wrapping the default template like this:

render = ViewMultiTemplate(ViewPageTemplateFile("portlet.pt"))

It is then possible to define additional templates with code snippets like:

additional_template = MultiTemplate(ViewPageTemplateFile("portlet2.pt"))

and zcml like:

<adapter
  factory=".portlet.additional_template"
  for=".portlet.Renderer"
  provides="collective.multitemplate.IMultiTemplate"
  name="Additional template"
  />

The registration of additional templates can live in a different package then the original portlet.

Changelog

1.0b1 - 2009-09-22

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.multitemplate-1.0b1.zip (13.5 kB view details)

Uploaded Source

File details

Details for the file collective.multitemplate-1.0b1.zip.

File metadata

File hashes

Hashes for collective.multitemplate-1.0b1.zip
Algorithm Hash digest
SHA256 95bdae9c119a5a3549b4852f1a40a69f0e8343be0ba5801ef2efeea5fa2160b8
MD5 bebc9a24ac77c537e10af43fc53ef89f
BLAKE2b-256 209969ba592bf56af0577e29b0f0fe4f4d69b54717e9810f16bcafa1954f5fa1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page