b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Back-office Reference
  3. Collections
  4. Settings
  5. Item types
  6. Item Type form
  7. Item Type: Custom Fields Panel

Item Type: Custom Fields Panel

This panel lets you define Custom Fields for the current Item Type.

Item Type: Custom Fields Panel

The different columns also appear in the "details" form which you can open with the "edit" icon for each field. Please see below for an explanation of these details.

Adding/Defining New Custom Fields

Item Type: Custom Fields Panel

You can define custom fields of the following types:

  • Numeric: Useful for Price, Weight, Length, etc. This field will be stored as a double floating-point number.
  • Computed : The value will be computed with formula from other Numeric or computed fields. See the Formula field below.
  • String: Useful for text strings such as Brand, Color, Fabric, etc. This field will be stored as a varchar() field.
  • Text: Useful when you need multiple lines of text
  • HTML: Useful when you need (multiple lines of) text including formatting.
  • URL: Useful for URLs that will be clickable (potentially in the form of a button).
  • Image: Useful to reference an image (but its Link ID) to have it appear in a specific place of a template or to have it appear in comparison tables.
  • Separator: This is useful to group several custom fields under a heading that will separate groups of fields, for example in comparison tables.

Custom fields from another item type can also be added. Select the item type from which to import the custom type in the Add fields from another item type field then click on the Select fields… button. This will show a pop-up window listing the available custom fields from the selected item type.

Item Type: Custom Fields Panel
List of custom fields available for import

Check all the custom fields that you want to add and click on the Add fields now! button to finish the process.

Custom Field Details

You can open the following pop-up/modal dialog by clicking the "edit" icon for a specific field:

Item Type: Custom Fields Panel

Custom field with type "Computed" has an additional option "Formula":

Item Type: Custom Fields Panel
  • Order: the order of the field relative to the others. Useful to order field in the back and/or front-office.
  • Title (sometimes also called Field Label): the label that will be displayed to name the field
  • Name (sometimes also called Field Code): the internal code you will need to use to designate specific fields to display in a widget, in a short tag or in PHP code
  • Schema Property Name: Use this if you want the custom field to be used as a semantic markup in the generated web pages.
  • Type: see above. The type of a field cannot be changed after creation.
  • Format: allows to format the output of numeric fields:
    • Simple format example: with format $ 0 0.00, the value 12345.6789 will be displayed as $ 12 345.67.
    • Complex format: different formats can be specified for positive number, negative number, zero, empty field and special values. Each format will be separated by ;.
      • Complex format example for a "Cancel within…" field: 00 days;;#no# Not available;;9999=Anytime!
      • The 5th and next formats can be used to specify custom values like 123=text then custom field value 123 will be replaced with text.
    • More examples:
      • 00$ => 12346$
      • $00.0 => $12346.7
      • 00.0 => 12345.7
      • 0 0.0 => 12 345.7
      • 0'0.0 => 12'345.7
      • 000.000,0000000 => 12.345,6789000
      • 0,0 => 12345,7
      • 0.0 => 12345.7
      • 0 0,00 => 12 345,68
      • 0 0.00 => 12 345.68
      • 0 0 => 12 346
      • 0′0 => 12′346
      • 0.0,00 => 12.345,68
      • 0,0.00 => 12,345.68
      • 0.0, => 12.346
      • 0,0. => 12,346
    • You can add CSS classes with [.classname]
      • Example for positive numbers in green and negative numbers in red: 0 0.0[.green];0 0.0[.red]
    • Possible masks in formats:
      • #yes# or (yes) - green check icon
      • #no# or (no) - red cross icon
      • (+) - green plus sign in circle
      • (-) - red minus sign in circle
      • (!) - orange exclamation sign in triangle
      • || - new line
      • | | - space
      • {note_sample_text} - <span class="note">note_sample_text</span>
      • #stars/5# - 5 yellow stars
      • #stars:2.3/5# - 2.3 of 5 stars
    • For field type "Separator", you can specify a format like repeat:company_logo which means you want to repeat the pre-exising field company_logo below the separator.
  • Formula: this is where you enter a formula for computed fields.
    • Example: $prep_time$+$cook_time$+$passive_time$ will produce the SUM of the fields having the codes prep_time cook_time & passive_time.
    • IMPORTANT NOTES:
      • The results of the formula are computed on post save (and will trickle down to child posts when needed). If you change a formula you need to re-save the posts that use it in order to see the changes.
      • NULL values/empty fields will be considered as 0 in the computation. If this leads to unwanted results, you may be able to hide the result with the Format string.
  • Note: displayed in the back-office.
  • Required: check to indicate that this custom field is required.
  • With MC: check to include this custom field in the meta-comment form. This custom field can be updated at the same time when a meta-comment is created.
  • Public: if not checked, the field will be shown only in the back-office.
  • Display condition: this lets you specify conditions (based on the URL parameters) when the field should be displayed.
    • For example, if you specify cur=euro here, the field will only be displayed if a URL parameter cur has a value of euro.
    • A field can be displayed for several cases, for example details=std|full
    • A field can also be restricted by multiple conditions, for example details=std|full&cur=euro
  • Header cell class: CSS class names used to style the Title/Label of each line with the widget and short tags that display in table format.
  • Data cell class: CSS class names used to style the value cells in tables (see "Header cell class" above).
  • Link: should the value be displayed as a link? This is useful for URL custom fields but also other types of fields can link to the permalink of the Item or the "Link to" Url of the item.
  • Link class: CSS class to style the <a href=...> tag.
  • Line highlight: useful in comparison tables, to highlight the lines that have differences between the compared items.
  • Green highlight: useful in comparison tables, to highlight the cells with the lowest/highest value.
  • Red highlight: useful in comparison tables, to highlight the cells with the highest/lowest value.
  • Description: will appear in a tooltip.
  • Auto merge: if checked, multiple columns with the same value will be merged. It can be used to display tables with less redundant info.
Tags: 7.0.2
Created by fplanque • Last edit by fplanque on 2020-08-31 23:13 • •

No feedback yet

On this page

  • Adding/Defining New Custom Fields
  • Custom Field Details

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
    • Site
    • Collections
      • Collection Dashboard
      • Contents
      • Comments
      • Categories
      • Features
      • Skins
      • Widgets
      • Settings
        • General
        • URLs
        • SEO
        • Item types
          • Item Types
          • Custom Fields
          • Item Type form
            • General Settings
            • Structured Data
            • Use of Instructions
            • Features
            • Advanced Properties
            • Use Location
            • Use Comments
            • Custom Fields
            • Allowed Item Statuses
        • Item Statuses
        • Advanced
        • Advanced Permissions
        • Plugins
        • Common Settings
      • Creating a new collection
    • Files
    • Analytics
    • Users
    • Messages
    • Emails
    • System
    • Working with Results Tables
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
CMS + email marketing

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque