BoldMinded Docs
  • Overview
  • Advanced Categories
    • Docs
      • Installation
      • Requirements
      • Setup & Configuration
        • Hidden Config Options
        • Multi-Site Manager
      • Template Tags
      • FAQs
  • Ansel
    • Docs
      • Installation
      • Upgrading
      • Requirements
      • Settings
      • Usage
        • Channel:Form
      • Troubleshooting
      • Template Tags
    • FAQs
  • Bloqs
    • Docs
      • Why Bloqs?
      • Features
        • Add Bloq Menu
        • Nesting
        • Cloning
        • Drafts
        • Bloq Usage
        • Deprecated Bloqs
        • Caching
        • Profiling
        • Bloq Components
        • Bloq Groups
      • Installation
      • Requirements & Compatibility
      • Setup & Configuration
        • Hidden Config Options
      • Creating Bloqs
      • Template Tags
        • Twig
        • Examples
      • Context Variables
      • Add-on Developers
    • FAQs
  • Carson
    • Docs
      • Installation
      • Requirements
      • Fields
        • Omni
          • Hidden Config
        • Assistant
        • SEO
      • Troubleshooting
  • Custom System Messages
    • Docs
      • Installation
      • Requirements
      • Variables
      • Template Tags
  • DataGrab
    • Docs
      • Installation & Upgrading
      • Requirements
      • Troubleshooting
      • Configuring Imports
      • Running Imports
      • Automatic Imports
        • Importing with cron
        • Importing with cron (Deprecated)
      • Endpoints
      • Configuration Options
        • Config File Options
        • Increasing PHP memory limit
      • Import Types
        • CSV
          • Importing into Grid or Matrix field
        • JSON
          • Example file
        • WordPress
        • XML
          • Example file
        • Creating your own import type
      • Assigning Authors
      • Field Types
        • Assets
        • Ansel
        • Bloqs
        • Calendar
        • Channel Images
        • Date
        • File
        • File Grid
        • Fluid
        • Grid
        • Low Events
        • Relationships
        • Simple Grids & Tables
        • Tag & Tagger
        • Matrix (Deprecated)
        • Creating your own fieldtype
      • Publisher
      • Version 5.0
      • Version 6.0
    • FAQs
  • Feature Flags
    • Docs
      • Installation & Upgrading
      • Requirements
      • Configuration
      • Template Tags
      • A/B Testing
    • FAQs
  • Fluidity
    • Docs
      • Installation & Upgrading
      • Requirements
      • Configuration
      • Demos
    • FAQs
  • Logit
    • Docs
      • Installation
      • Requirements
      • Configuration
    • FAQs
  • Publisher
    • Docs
      • Installation
      • Requirements
      • Issues & Tips
      • Languages
      • Template Tags
        • Forms
        • Email Notification Templates
        • Channel:Form
        • Twig
      • URL Translations
      • Auto Translations
      • Diffs
      • Drafts
      • Categories
      • Phrases
      • Persistence
      • Performance
      • Add-ons
        • First Party
        • Third Party
      • Hidden Config
      • Extending Publisher
    • FAQs
  • Reading Time PRo
    • Docs
      • Installation
      • Requirements
      • Configuration
      • Template Tags
  • Reel
    • Docs
      • Installation
      • Requirements
      • Settings
      • Field Tags
    • FAQs
  • Simple Grids & Tables
    • Docs
      • Installation
      • Requirements
      • Template Tags
      • CSV File Imports
      • Field Settings
      • GraphQL
      • Advanced Configuration (deprecated)
    • FAQs
  • Sitemap
    • Docs
      • Installation
      • Requirements
      • Configuration & Usage
    • FAQs
  • Snaptcha
    • Docs
      • Installation
      • Requirements
      • Configuration
      • Template Tags
      • Developers
    • FAQs
  • Speedy
    • Docs
      • Installation & Updating
      • Requirements
      • Configuration
      • Template Tags
      • Static Caching
        • Real World Example
      • Frontedit Support
      • Control Panel
      • Migrating from CE Cache
      • Diagnostics
      • CLI Commands
      • Reverse Proxy Purging
    • FAQs
  • Trek (unreleased)
    • Docs
      • Configuration
    • FAQs
  • Queue
    • Docs
Powered by GitBook
On this page

Was this helpful?

  1. Advanced Categories
  2. Docs

Template Tags

Last updated 6 months ago

Was this helpful?

Advanced Categories has been deprecated and is no longer for sale or supported. ExpressionEngine 7.4 introduces many of Advanced Categories features as natively to ExpressionEngine.

Advanced Categories is a fieldtype, and as such it works just like any other fieldtype in ExpressionEngine. The following examples assume you created a custom field with the label of "My Category Field", and the field template short name is {my_category_field}

Every Advanced Categories field is a tag pair, and even though it is a field, the tag pair functions almost exactly the same as the {categories}{/categories} tag pair from the {exp:channel:entries} tag ().

{exp:channel:entries}
    {title}
    {my_category_field}
        {category_id}
        {category_name}
        {category_image}
        {category_description}
        {category_group}
        {my_custom_category_field_1}
        {my_custom_category_field_2}
        {path="path/to/category/page"}
        {category_total_results} or {total_results}
        {category_count} or {count}
    {/my_category_field}
{/exp:channel:entries}

This tag pair does not have support for the show or show_group parameters

Since it is also a fieldtype you have access to several tag modifiers:

{my_category_field:ids} This will list all the IDs of the categories chosen in the field separated by pipe. For example: 1|2|3. If only a single category is selected, then its output would be that category ID.

{my_category_field:url_titles} This will list all the IDs of the categories chosen in the field separated by pipe. For example: alpha|beta|charlie. If only a single category is selected, then its output would be that category ID.

{my_category_field:category_names} This will list all the IDs of the categories chosen in the field separated by pipe. For example: Alpha|Beta|Charlie. If only a single category is selected, then its output would be that category ID.

All tag modifiers above support the separator="," parameter where you can change the pipe separator to another character of your choice. For example{my_category_field:ids separator=","} will output 1,2,3

If you wanted to see if an entry is assigned to a category you can use a simple conditional:

{exp:channel:entries}
    {title}
    {if my_category_field:ids ~ "/(1|2|3)/"}
        This entry is assigned to either category 1, 2 or 3
    {/if}
{/exp:channel:entries}

see ExpressionEngine docs