Questa sezione รจ disponibile solo in lingua Inglese.

 This document refers to the current version of Custom Properties for J1.5

Tagging

Tagging is applying labels to content items. It's the simplest configuration of all.

  1. Install Custom Properties component

  2. Create custom properties fields

  3. Assign properties (tags) to content items

  4. Install and enable CP tags plugin

  5. Insert {cptags} at the end of the content.

  6. 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” 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”)

Image
Overlay window for tagging operations.
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. You thus need the frontend module.

  1. start from “tagging” configuration

  2. enable “frontend editing” in component configuration

  3. set the required access level for tagging operations (public, registered, special)

  4. install and enable the custom properties search module (mod_cpsearch)

  5. enable and set access level in module configuration (Yes, frontend editing is configured globally and on a per-module basis)

Now visitors with appropriate access level can add or replace the tags of a content item.

 

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.

  1. start from “tagging” configuration

  2. install and enable the custom properties search module (mod_cpsearch)

  3. 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 tag will be displayed at the bottom of each excerpts. There are several parameters you can fiddle with in order to customize the output (text length, page title, show tag name).

 

Combined search

Even the tag search is unsatisfactory sometimes. To get the best of both search approaches, 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.

Image
Text and tags search results.
 

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.

Image
Results summary.
 

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 installed (books, documents, etc) , the drill-down menu will adjust itself accordingly.

 

Delimiting 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.

Image
Each field can be assigned to one or more search modules.