Gallery2:Modules:title - Gallery Codex
Personal tools

Gallery2:Modules:title

From Gallery Codex

Title Search Dynamic album

Description

Adds dynamic album views that provides two dynamic album views, one showing all items whose titles begin with a given character string, and the other showing all items whose titles contain a given character string. Short urls (via the urlrewrite module) make these views easy to link from external pages and scripts, and two blocks that can be added to album pages demonstrate a couple of ideas of how to use the module.

Features

  • Adds 2 blocks; a AJAX search block and a 'begins with' block:

Title blocksInSidebar.png
Two blocks in sidebar


AjaxSearchTitle.png
Ajax search in action.


  • For Title Search Dynamic album you can set:
    • The album size (total number of items; depending on theme settings this may span multiple pages)
    • All aspects of a album some examples are:
      • Rows
      • Columns
      • Blocks to show in the sidebar
      • Color Pack
      • etc.....

Installation

  • Install and activate this module from the site admin -> plugins page.
    • click the Get More Plugins tab.
    • Verify that the Community plugins is checked under; Show Repository list.
    • Click Update Repository list.
    • Download the Title Search module.
  • Configure the dynamic albums in site admin -> Title Search.
  • Activate the URL rewrite rules for the 2 album types.

Usage

Syntax for linking to these dynamic albums are as follows:

    ...main.php?g2_view=title.Begin&g2_chars=xxx

and:

    ...main.php?g2_view=title.Contain&g2_chars=xxx

Both views are limited to the first 100 items, if there are more than this.

There are also two shortforms if you have activated these in the urlrewrite module: Title Search rewite rules.png

    /contain/xxx

and:

    /begin/xxx

Theme customizations

To add the blocks to a theme template file use:

    {g->block type=title.InitialLetters}

and / or :

    {g->block type=title.FindTitles}