panels

Hyper-dynamic Drupal sites with Panels and Views

The motivation for writing this article came from my feeble attempts at trying to discuss a module I'm actively working on (to be covered in a future article) with several very intelligent Drupal developers. Due to the inherently abstract nature of the issues, and for lack of a common language, the end result was that in every case each person just ended up scratching their heads at me without really comprehending what I was really trying to get at.

Hyper-dynamic defined
Technically speaking, Drupal offers a dynamic framework right out of the box, right, so what is meant by "hyper-dynamic"?

Hyper-dynamic, for lack of a better description, refers to sites/sections-of-a-site for which pages do not exist as individual nodes, AND which (for example) are more complex than a single static view/panel. A panel/view which takes arguments, particularly multiple arguments, is an example of hyper-dynamic content delivery.

Getting down to business...
How is this idea of hyper-dynamic content useful and/or or what are the use cases?

As a 'simple' example, let's say we have a multi-regional travel site which caters to people looking for info/deals on casinos. For each region, we'd like to have a separate homepage, AND separate landing pages for each casino within the region. Finally, let's throw in a "Deals" subpage for every region/casino.

So the site hierarchy would look like this:

Name that tune
The challenge is to figure out the fewest parts we can make this architecture, while still maintaining flexibility/maintainability/upgradability.

In this case, we can accomplish our proposed site hierarchy, for an unlimited number of regions/casinos, with as little as 3 views, 3 panels, 2 content-types, and a handful or arguments:

Views used
1. "Node listing" - provides node-listing for each region/casino determined by arguments. This view is placed in the "Landing panel" (see below).
2. "Deals listing" - provides deals node-listing for each region/casino. This view is placed within the "Deals panel" (see below).
3. "Homepage listing" - provides node-listing for homepage. This view is place within the "Homepage panel" (see below).

Panels used
1. Landing panel - Provides complete landing page for each region/casino based on arguments
2. Deals panel - Provides complete "Deals" subpage for each region/casino based on arguments
3. Homepage panel - Provides homepage. Could theoretically even get away with just using the landing panel for this, but by using a separate one for the homepage we get a little more
flexibility and sanity.

13 December, 2007
Subscribe to RSS - panels