Search scope
Custom Properties allows a fine grained control of the search scope at component and module level. Being able to restrict the search scope at module level makes possible to have several thematic search modules in the same website.
How custom properties fields are evaluated
General rule: different fields are evaluated with an AND condition; different values of the same field are evaluated with an OR condition.
Example
We run a wine reviews site. To tag our wine reviews articles we set up 3 custom properties fields fields:
Color, type select; values [red, white, pink]
Alcohol, type select:values [low, medium, strong]
Country, type checkbox: values [a long list of countries]
Combining search field NARROWS your search. The illustration below shows a search with Color: [Red] and Alcohol: [Low]. The result will be limited to articles about [Red] wines with [Low] content of alcohol.
You can also BROADEN your search by select more than one value from the Country field. Results will be expanded to include wines tagged with ANY of the countries you selected.
The illustration below shows a search with 3 countries selected [Italy], [Spain], [France].
Content Element Connectors
CP content elements connectors are XML files , that tell CP how to handle a generic content item. Without any content element, CP falls back to standard content items (articles).
Content elements files are contained into administrator/components/com_customproperties/samplece directory. To write your own contet element connector just take inspiration from the existing CE files and replace the field names with the actual ones of content item you are mapping.
Content elements can be uninstalled and uninstalled using Components > Custom Properties > Utilities > Manage content elements.
A note to fellow developers: starting from Custom Properties 2.1 for J1.6 - J2.5, content element connector supports JSON fields, using the following notation: databases_field_name.json_field_name.
E.G. images.image_intro
where 'images' is the name of the field in the db table and 'image_intro' is the name of the field in the decoded JSON object
Warning: installing content elements of non-installed components causes Custom Properties to crash.
Style
The component and the modules have been developed to allow the styling with CSS2 style sheets, so that you can easily merge them into your site.
CPsearch module layout (table/div) can be set with module's parameters. Table layout renders properly with all templates we tried but it's a little "stiff" you want to customize its appearance. On the other hand Div layout let's you do "magic" but some CSS wizardry is likely required.
CPcloud and CPmenu modules come with their own style sheet, that can be disabled in module config.
Date Range Search: "Event Mode"
Starting from Custom Properties 2.0, it is possible to search content items in a delimited period of time. Enable this feature by setting 'Search by date range' to yes in CPsearch module configuration.
We consider the 'created date' as the beginning of the event and 'end publishing' as end date of the event. By means of the two calendar controls at the bottom of the search module (see picture), you are able to set the start-from and end-to date you your search. All articles that has one date within the search range will be returned. The illustration that follows show the concept.
If the start date is omitted, Custom Properties will use today's date. If the end date is omitted CP will use infinity. It's possible to configure the module to require always both dates.
Date Range Search: Standard Mode
Starting from Custom Properties 2.1 a more conventional date range search is available. It retrieves only the articles whose ''Created date' is comprised between a given 'start date' and 'end date'. This function is controlled by parameter [Use 'Event mode' to search by date] in CP config.