- b2evolution CMS User Manual
- Front-office Reference
- Widgets Reference
- Listing Contents
- Compare Item Fields Widget
Compare Item Fields Widget
This widget displays the differences between custom fields of specified items or all items in a collection.
Example
You can create a sample comparison of recipe items in the demo collection "Blog B" by customizing the front page and adding the widget to the "Front Page Main Area" container:
Set the Items to compare to All from collection
and the Restrict to Post Type to Recipe
. This will compare the custom fields in all the posts with Item Type Recipe
in the collection. You can further restrict the posts to include in the comparison based on other Item properties such as Category and Item Tag.
Settings
- Title: the title to display.
- Items to compare: this option lets you select what items will be included in the comparison.
- All from collection: select this to compare ALL items in the current collection.
- As specified by "items=" URL param: select this to compare items specified through URL param.
- Specific IDs listed below: select this to compare specific items only.
- Specific Item IDs: comma-separated list of Item IDs to compare if you selected "Specific ID listed below" for the "Items to compare" parameter above.
- Restrict to Post Type: restrict items to be compared to this item type.
- Restrict to featured: restrict items to be compared to featured items only.
- Restrict to Categories: restrict items to be compared to the specified categories. Categories should be comma-separated.
- Restrict to Tags: restrict items to be compared to specified item tags. The item should have ALL tags specified to be included in the comparison.
- Limit: specifies the maximum number of items to be compared.
- Allow filter params: check this option to allow filtering/ordering with URL params such as
cat=
,tag=
,orderby=
etc. Show/Hide columns based on condition found in field: restrict visibility of items/columns in the comparing table by condition found in the custom field specified here. Example:
Note: Once it works, you can hide the condition field by marking it as a private field (instead of public field).- Default order: specifies how items should be ordered when comparing. This is important especially if you specified a limit to the number of items to be compared.
Lines to Show
- Show column headers: check to display the column header.
- Auto merge: check this if you like to merge the column headers when they are identical.
- Show item visibility status: select how you would like to display the item visibility status.
- Fields to show: defines what fields of each item to display in the comparison.
- Automatic cell colors: check these options if you would like to automatically add the appropriate colors for each cell field.
- Hide empty lines: check this to hide empty lines.
- Edit Links: check to add a row with edit buttons for editors who have permission.
Advanced
- Identify rows with
comp_row_
+ field code: check to add style class likecomp_row_custom_field_code
to each cell of the row - Identify columns with
comp_col_
+ Item slug: check to add style class likecomp_col_item_slug
to each cell of the item/column - Identify column category with
comp_cat_
+ main Cat slug: check to add style class likecomp_col_item_main_cat_slug
to each cell of the item/column
Example: