Dev:Displaying Blocks Conditionally

From Habari Project

Jump to: navigation, search

This page describes an upcoming feature of Habari. Scopes is not currently implemented.

Habari can position small bits of content called Blocks into specific areas of a site's theme. These can be styled using templates specific to the Block and to the Area that it's in. Scopes give you further control over how and Blocks are displayed.

For example, you could use Scopes to display a certain Block only on the page for a single blog post rather than a listing of entries, or only display the Block when you're looking at the home page. Using Scopes, you can define conditions that change what Blocks are displayed in an Area based on some criteria. The Scope can be triggered by a URL or a Rewrite Rule and whatever Scope qualifies firstis the one that's used. If no Scope conditions qualify, the default Scope is used.

Personal tools