Foreword
The following procedures can differ slightly from version to version. Some features are available only in the most recent packages. The screenshots refer to an older version of Custom Properties however the procedures are basically the same for all versions.
Basics: create a custom property
This is the first step. Before start assigning tags, they need to be created.
-
Extensions > Custom Properties > Manage Custom Properties
-
Click "New"
-
Enter the field name (no strange chars here) and the field label (any charset is OK). Select the field type and make it "Published". Click "Apply"
-
Click "Add Value"
-
Enter value name (again, no strange chars) and the value label.
-
Repeat steps 4 and 5 to enter mode values
-
Click "Save"
The first custom property is ready to be assigned.
Basics: assign a tag
There are two ways to assign tags from the backend.
-
Extensions > Custom Properties > Assign Custom Properties
-
Check one or more articles
-
Select one or more property values
-
Click "Add" or "Replace"
Alternate procedure (requires the plugin button):
-
Edit one article
-
Click the "CP Tags" button under the editor
-
Select one or more property values from the popup window
-
Click "Add" or "Replace"
Tagging
Tagging is applying labels to content items. It's the simplest configuration of all.
-
Install Custom Properties component
-
Create custom properties fields
-
Assign properties (tags) to content items
-
Install and enable CP tags plugin
-
Optionally the tags can be turned into links, so that when the user clicks them, all items with that tag are retrieved.
For bonus points you can turn on the "tag in meta" plugin option that will append the tags to the "meta keywords". This scenario does not even require the search module.
Social tagging
(as in "visitor-can-tag-content-but-only-with-my-tags")
There are sites that allow visitors to rate or otherwise tag the content. Giving site visitor access to the backend is not the best way to do it. From a security and simplicity standpoint, it's much better to let visitors interact only with the frontend.
-
Start from "tagging" configuration
-
Install and enable the CP tags plugin
-
Enable "Frontend tagging" in component configuration
-
Set the "Frontend editing access" level for tagging operations (public, registered, special)
-
Optionally install and enable the CP tags plugin button, to let users assign tags from the articles editor
Now visitors with appropriate access level will see an "Add tag" tag too. When clicked it pops up a window with all available tags.
Advanced search
Sometimes the standard search is unsatisfactory because too generic or because the appropriate search term is not written into the content. For instance, you'll hardly find "'70-80 decade" into the review of Saturday's Night Fever album, but that would likely be a good tag to label the record with, for a later retrieval. The tag search is the most common setup for current custom properties installation.
-
Start from "tagging" configuration
-
Install and enable the custom properties search module (mod_cpsearch)
-
The module will automagically show the available custom properties fields, ready to be used for content search
With the default component settings, the result will be a list of excerpts of content items tagged with the selected fields. The tags will be displayed at the bottom of each excerpt. There are several parameters you can fiddle with in order to customize the output (show HTML introtext, text length, page title, show tag name, etc.).
Combined search
Even the tag search is unsatisfactory sometimes. To get the best of both tag search and textual search, you can add the traditional text search to the module with a parameter. The result will be the intersection of the result sets from tag search and text search, that is: you get all content items tagged with selected tag AND containing the search text.
The text search functionality is not as sophisticated as to replace completely the standard mod_search, but it can suffice in most occasions. It is useful to narrow down a large set of results returned by the tag search.
Drill down results
With large sites, hosting hundreds of content items, navigating through the search results can be frustrating and time consuming. A parameter in component configuration adds a result summary before the actual result.
The summary consists of a list of categories with the count of relevant items returned by the search. At a glance you get to know how many items match your query and to which section they belong to. Clicking on the section name will return content items matching your query AND belonging to the section. If content elements plugin are found (books, documents, etc) , the drill-down menu will adjust itself accordingly.
Delimiting the search scope
You'll hardly want site visitors to search all the content of the site. There are sections (legal terms, privacy-and-stuff comes to mind) that are not to be searched. In order to cope with multiple scenarios, the search scope can be limited either globally (component level) and on a per-module basis. For instance you could have a search module searching the CDs section of your site and another module searching the Book section. Custom properties fields can be assigned to all / more / one module, otherwise you'll end up having CD-related-tags in your Book search module too.