Add a Blogger-like collapsible archive block to your Drupal 7 site

A few years back I took advantage of Jack O'Connor's great how-to article to create a collapsible content archive block in Drupal 6. I'm now developing a Drupal 7 site and needed to do the same type of thing. Here's basically the same process, but for Drupal 7. This article assumes that you've installed the Views module (including its prerequisite, Chaos tools suite), and understand how to add JavaScript and a custom stylesheet to your Drupal site. You can see a working example here.

Update: Emilio commented below with a nice way to add node counts to each month. I've added his suggestions to my procedure. 

1. Create a new View

Here's the view exported to a text file. Import it as a new view and you can skip to step 3. Otherwise, carry on...

  • Navigate to the Views page (/admin/structure/views/add) and create a new view (figure 1)drupal7-collapsible-archive1
  • Give the view a name and a description (optional). I called mine 'Collapsible Archive'.
  • Set your desired Show parameters. I went with 'Show Content of type All tagged with [empty] sorted by Newest first' since my archive is for blog articles.
  • Uncheck 'Create a page' and check 'Create a block'
  • Give the block a title and set 'Display format' to 'HTML list'
  • Leave 'Use a pager' unchecked and click 'Continue & edit'

Read more: Add a Blogger-like collapsible archive block to your Drupal 7 site

Add image thumbnails to the contacts category listing in Joomla 2.5

A commonly requested feature of the Joomla Contacts component is to be able to show the contact's photo in the category listing view. Here's a simple way to create a template override which adds a column to that table. I'll also show you how to make the thumbnails act as JCE MediaBox popups, should you happen to have it installed. Here's an example of what it all looks like.

First, copy the view template file from /components/com_contact/views/category/tmpl/default_items.php to /templates/<your_template>/html/com_contact/category/default_items.php. Then open it for editing.

Read more: Add image thumbnails to the contacts category listing in Joomla 2.5

Flat Track Minnesota

screenshot flattrackmnI had spent quite a bit of time updating the previous version of FlatTrackMN.com, a Joomla 1.5 site, so when the site was sold the new owner came to me to bring it up to date. We did a Joomla 2.5 conversion and worked in a new template. We simplified the site to make it less cluttered. I think it looks really good.

[site no longer active]

Create a custom 404 page in Joomla 2.5

There are a number of forum discussions at joomla.org on this topic, but none of them that I've seen cover the entire process in a simple manner. Here's what I do for a quick and easy custom 404. It's more or less what's here, but in simpler terms.

  1. Create a file named error.php and place it in your template's main directory (/templates/your_template/error.php). It should contain the following code:

    <?php

    // no direct access
    defined( '_JEXEC' ) or die( 'Restricted access' );

    if ($this->error->getCode()==404) {
    echo file_get_contents('http://yourdomain.com/oops');
    exit();
    }

    ?>

    Be sure and change the URL to reflect your site's domain.

    Read more: Create a custom 404 page in Joomla 2.5

Infection Control / Emerging Concepts

screenshot ic-ecA relative of mine directed his business colleague to me for some help in updating a truly awful Flash-based site--the kind that induces seizures. She needed something to allow customers to register for courses and purchase downloadable training resources. I wanted to improve her online business impression with a tasteful, simple site.

Built on Joomla 2.5 and using a RocketTheme template as a foundation we added an extension to handle the online course registration, and we implemented an Ecwid storefront for the downloadables. The two approaches handle very different needs well.

ic-ec.com

Mike Lattery at Summit Mortgage

screenshot latteryMike Lattery's site was another word-of-mouth project thanks to a former client. He needed his Joomla 1.0 site brought up to date with a new look, newly redesigned contact and application forms, and SSL encryption.

We employed another of RocketTheme's templates as a foundation for this Joomla 2.5 site.

mikelattery.com

iwa logo hwg logo    profile for isherwood on Stack Exchange, a network of free, community-driven Q&A sites