The HasTagOfPlugin (or simply "HasTagOf" in use) provides a query on the list of pages having a given tag, tags expressed using the TagPlugin.

See also: TagPlugin, TagManager, TagCloudPlugin, Burt Reynolds


Syntax#

Creating a query for a single tag is pretty simple:

    [{HasTagOf tagname }]

The tag can optionally be wrapped in square brackets (since tags are also required to be wiki pages).

There is an optional "output" parameter, see the next section.

Simple Logic#

You can query on more than one tag where all are required by listing them with AND operators between:

    [{HasTagOf tagname1 AND tagname2 }]
For example,
   [{HasTagOf Actor AND Honcho }]
No pages.

You can query on more than one tag where any are required by listing them with OR operators between:

    [{HasTagOf tagname1 OR tagname2 }]
For example,
   [{HasTagOf Honcho OR Sidekick }]
No pages.

You can query on pages that don't contain a tag using the NOT operator:

    [{HasTagOf NOT tagname1 }]
For example (using the 'output' parameter, described below),
    [{HasTagOf output='count' NOT Honcho }]
About
About JSP Wiki
About NZPRG
Adafruit 320 x 240 TFT Display
Adafruit Metro Mini
Adafruit Mini Pi TFT
Adafruit Mini Pi TFT/MiniTFT-thumb.jpg
Adafruit Mini Pi TFT/MiniTFT.jpg
Ads 1015 Analog Digital Converter
Ads 1015 Analog Digital Converter/ads1015-chip.jpg
Ads 1015 Analog Digital Converter/ads1015-diagram.png
Ads 1015 Analog Digital Converter/ads1015-thumb.jpg
Ads 1015 Analog Digital Converter/ads1015.jpg
Alias Plugin
Alphabot 2
Approval Required For Page Changes
Approval Required For User Profiles
Arduino
Arduino/Arduino_Due.jpg
Arduino/Arduino_Micro-pinout-thumbnail.jpg
Arduino/Arduino_Micro-pinout.jpg
Arduino/Arduino_Micro.jpg
Arduino/Arduino_Nano_BLE_Sense-pinout-thumbnail.jpg
Arduino/Arduino_Nano_BLE_Sense-pinout.jpg
Arduino/Arduino_Uno.jpg
Arduino/arduino-yun-rev-2.2.jpg
Arduino Nano
Arduino Yún
Arduino Yún Interfacing
Arduino Yún Interfacing/Pololu-Zumo-0J6588.1200.jpg
Arduino Yún Interfacing/motor-shield-1438-04.jpg
Arduino Yún Interfacing/pololu_2508_trace_to_cut_to_disconnect_vin-thumb.jpg
Arduino Yún Interfacing/pololu_2508_trace_to_cut_to_disconnect_vin.jpg
Artificial Intelligence
BNO 055
BNO 055 Absolute Orientation Sensor
BNO 055 Imu Sensor
BNO 088
BNO 08 x
Bbc Micro Bit
Behavior Based Robotics
Behavior Trees
Behaviour Based Robotics
Behaviour Based Robotics/AIM-1293.pdf
Behaviour Based Robotics/Behavior-Based_Systems.pdf
Behaviour Based Robotics/Brooks-A_robot_that_walks.pdf
Behaviour Based Robotics/Brooks-Intelligence-without-Representation.pdf
Behaviour Based Robotics/Etzioni-Intelligence-wo-Robots.pdf
Behaviour Based Robotics/brooks (1989) a robot that walks; emergent behaviors from a carefully evolved network.pdf
Behaviour Based Systems
Behaviour Trees
Build Sequence
CSS Background Gradients
CSS Background Patterns
CSS Instagram Filters
CSS Prettify Theme Prism
CSS Prettify Theme Tomorrow Night Blue
CSS Ribbon
CSS Striped Text
CSS Theme Clean Blue
CSS Theme Dark
Camera As Sensor
Camera As Sensor/OAK-D-Lite.jpg
Capability Levels
Circuit Playground Express
Circuit Python
Code Of Conduct
Community
Components
Controllers
Copyright Notice
Css Plugin
David Anderson
Displays
Doppler Radar
Doppler Radar/DopplerRadar.jpg
E Books
ESP 32
ESP 32/TinyPICO_Nano.png
ESP 32/TinyPICO_Nano_Pinout.png
ESP 32/feathers2.png
ESP 32/feathers2_pinout.jpg
ESP 32/tinypico-specs-v2.png
ESP 32/tinypico-v2-both.png
Edit Find And Replace Help
Edit Page Help
Feather S 2
Fire 3
Firmata
Form Plugin
Full Recent Changes
GPIO
GPIO/gpio-rpa.jpg
GPIO/pinout-cli.png
GPIO/raspberry-pi-pinout.png
Getting Started
Goals
Hardware
Hardware Platforms
Has Tag Of Plugin
Heading Test
Hello World Plugin
How To Find Out How Hot Your Pi Is
How To Alias A Page
How To Backup An Sd Card
How To Blink An LED
How To Configure A Static Ip Address
How To Create A Bibliographic Entry
How To Debounce A Switch
How To Join
How To Tag A Page
How To Use Ssh Keys With Git Hub
I 2 C
IC
IMU
Ideas
If Insert Page Plugin
Iff Plugin
Image
Image/test.png
Image Plugin
Image Plugin/test.png
Inertial Measurement Unit
Inline Sidebars
Insert Page Plugin
Installation Tips
Installing The Python Pigpio Library
Interfacing Hall Effect Motor Encoder
Itsy Bitsy
Itsy Bitsy M 4 Express
Itsy Bitsy RP 2040
KC 01
KC 01/crickit-circuit-playground-thumb.jpg
KC 01/crickit-circuit-playground.jpg
KC 01/kc01-plate-thumb.jpg
KC 01/kc01-plate.jpg
KC 01/kc01-top-thumb.jpg
KC 01/kc01-top.jpg
KC 01/micro-gear-mod-thumb.jpg
KC 01/micro-gear-mod.jpg
KC 01/original-motor-thumb.jpg
KC 01/original-motor.jpg
KD 01
KD 01/KD01-side.jpg
KR 01
KR 01/KR01-0533-1280x584.jpg
KR 01/KR01-0533-800x360.jpg
KR 01/KR01-chassis-0177-thumb.jpg
KR 01/KR01-chassis-0177.jpg
KR 01/MiniTFT-1-thumb.jpg
KR 01/MiniTFT-1.jpg
KR 01/early-chassis-rear-thumb.jpg
KR 01/early-chassis-rear.jpg
KR 01/kr01-ir-plan-1.jpg
KR 01/on-the-bench-thumb.jpg
KR 01/on-the-bench.jpg
KR 01 Wiring Notes
KR 01 Wiring Notes/daughtboard-02.jpg
KR 01 Wiring Notes/starboard-aft-board-v2.png
KR 01 Wiring Notes/starboard-aft-connections.png
KRZ 01
KRZ 01/krz-01-carpet-800w.jpg
KRZ 01/krz01-bottom-thumb.jpg
KRZ 01/krz01-bottom.jpg
KRZ 01/krz01-front-thumb.jpg
KRZ 01/krz01-front.jpg
KRZ 01/krz01-iso-thumb.jpg
KRZ 01/krz01-iso.jpg
KRZ 01/krz01-iso2-thumb.jpg
KRZ 01/krz01-iso2.jpg
KRZ 01/krz01-side-thumb.jpg
KRZ 01/krz01-side.jpg
KRZ 01/krz01-templates-thumb.jpg
KRZ 01/krz01-templates.jpg
KRZ 01/krz01-top-thumb.jpg
KRZ 01/krz01-top.jpg
KRZ 02
KRZ 03
KRZ 03/KRZ02.jpg
KRZ 03/krz03.jpg
LBR 01
LBR 01/LetterboxRobot2778.jpg
Left Menu
Left Menu Footer
Lo Ra
Login Help
M 4 Express
MR 01
MR 01/MR01-2024-05-18.png
Main
Mars Rover
Mars Rover/Open_Source_Rover_Patch.jpg
Mars Rover/km01-design.png
Mars Rover/osepp-tank-wheel.jpg
Mars Rover/servoblock_on_servo.jpg
Meta Goals
Micro Bit
Micro Python
Microbit
Microbit/MARS-robot.png
Microbit/Maqueen_Lite.jpg
Microbit/adafruit_crickit.jpg
Microbit/bitbot..jpg
Microbit/bitbot.jpg
Microbit/bitbot_xl.jpg
Microbit/bitface.jpg
Microbit/kitronik-halo.jpg
Microbit/maqueen_lite.png
Microbit/maqueen_plus.jpg
Microbit/microbit-anime.gif
Microbit/microbit.jpg
Microbit/minibit.jpg
Microbit/move-mini-mk-2.jpg
Microbit/robotbitmk3_buggy..jpg
Microbit/ultrasonic_sensor.jpg
Microbit/waveshare-alphabot2.jpg
Microcontroller
Microprocessor
Microprocessors And Microcontrollers
Mission Statement
More Menu
Most Popular Plugin
Motor Encoder
Motors
Murray
Murray Altheim
Murrays Thesis
Nano Pi Fire 3
Nano Pi Fire 3/Fire3_04.jpg
Nano Pi Fire 3/nanopi-fire3.png
News
Next Plugin
Notes Plugin
Notice Plugin
Nuvoton
Nuvoton MS 51
Nuvoton MS 51/IoExpander.png
Nuvoton MS 51/RotaryEnc.png
Nuvoton MS 51/SuperDinkyBlinky.png
Odometry
On Artificial Intelligence
One Minute Wiki
Operating Systems
Optical Flow Sensor
Optical Flow Sensor/PAA5100JE-Q-GDS-R1.00_25072018.pdf
Optical Flow Sensor/PAA5100JE-fab.jpg
Orange Pi
Orange Pi/orangepi4.jpg
Orange Pi
Orange Pi 4
Organisation
Organisational Goals
Organisational Tasks
Organisational To Do
PID Controller
PID Controller/pid_bounce_log.html
PID Controller/pid_log.zip
PID Controller/ros-2020_10_02T20_31_53_278210.csv
PID Rug Bump Challenge
PID Rug Bump Challenge/rug-bump.jpg
PSU
Page Alias
Page Index
Page View Count Plugin
Pages Being Edited
Person
Personal Robotics
Pico
Pid Controller
Platforms
Power Supplies
Power Supplies/12w-adapter-thumb.png
Power Supplies/5w-adapter-thumb.png
Power Supplies/bench-supply.png
Power Supplies/nuclear.jpg
Power Supply
Power Supply Unit
Previous Plugin
Privacy Policy
Projects
Prototype
Prototype Robot
Py Mata Express On Arduino
Py Mata Express On Itsy Bitsy
Pyboard
Python
Query Plugin
RFM 69
RP 2040
Random Pages Plugin
Raspberry Pi 4
Raspberry Pi
Raspberry Pi/RaspberryPi3B+.jpg
Raspberry Pi/RaspberryPi4.png
Raspberry Pi/RaspberryPiA+.jpg
Raspberry Pi/RaspberryPiZeroW.jpg
Raspberry Pi OS
Raspberry Pi Operating System
Raspberry Pi Pico
Raspberry Pi Pico/Raspberry-Pi-Pico-pinout-diagram.svg
Raspberry Pi Pico/getting-started-with-pico.pdf
Raspberry Pi Pico/hardware-design-with-rp2040.pdf
Raspberry Pi Pico/pico-oblique-800x.jpg
Raspberry Pi Pico/raspberry-pi-pico-python-sdk.pdf
Raspberry Pi To Arduino Over I 2 C
Raspberry Pi To Arduino Over I 2 C/pimaster2ardslave-0542-550x504.jpg
Raspberry Pi To Arduino Over I 2 C/pimaster2ardslave-0542.jpg
Raspbian
Recent Changes
Recipes
Redirect Plugin
Refactor Me
Reference Pages
References
References/Autonomous Military Robotics: Risk, Ethics, and Design.pdf
Referred Pages Plugin
Referring Pages Plugin
Reindex Plugin
Rejected Message
Remote Controlled Vehicle
Requests
Restricted Hello World Plugin
Restricted Wiki Plugin
Reviews
Robot
Robot Chassis Dynamometer
Robot Chassis Dynamometer/20200924_163518.jpg
Robot Chassis Dynamometer/20200924_163705.jpg
Robot Control Systems
Robot Controllers
Robot Design
Robot Operating Environment
Robot Platforms
Robot Prototypes
Robot Related Goals
Robot Sumo
Robot Sumo/RoboCore_Robot_Sumo.jpg
Robot Weight Categories
Robot Weight Classes
Rodney Brooks
Rodney Brooks
SPI
SR 04
SR 04/sr04-diagram-44.jpg
SR 04/sr04-front-49-thumb.jpg
SR 04/sr04-front-49.jpg
SR 04/sr04-geometry.jpg
SR 04/sr04-oblique-36.jpg
STM 32
Sand Box
Scope
Search Page Help
Sensors
Sidebars
Site Organisation
Software
Software Libraries
Steering
Steering/SteeringServo.png
Subsumption Architecture
Subsumption Architecture/BundyA_A Subsumption Architecture.pdf
Subsumption Architecture/Toal - Subsumption Architecture.pdf
Sumo
Switch
Switches
System Info
Tag
Tag Cloud Plugin
Tag Manager
Tag Plugin
Tags Plugin
Tasks
Technical Documentation
Telerobotics
Text Formatting Rules
Thunder Borg Wiring
Timely Greeting Plugin
Tiny Pico
Tiny Pico Nano
Title Box
To Do
Tools
Tooltip Plugin
Transclude Plugin
Tutorials
USB Power Supplies
USB Power Supplies/12w-adapter-thumb.png
USB Power Supplies/5w-adapter-thumb.png
USB Power Supplies/nuclear.jpg
Ultrasonic
Ultrasonic Sensor
Ultrasonic Sensor/HRLV-ShortRange-EZ.png
Ultrasonic Sensor/Ping_SMRT.ino
Ultrasonic Sensor/Polaroid_SX_70_Sonar_AutoFocus.jpg
Ultrasonic Sensor/Smart_Sensor_Spec_2013-03-08.pdf
Ultrasonic Sensor/Smart_Sensor_Ultrasonic_Development_Kit_for_Arduino_Spec-201303-08.pdf
Ultrasonic Sensor/ultrasonic.png
Undefined Pages
Unused Pages
Upgrading Python
Using Ssh
Vendors
Visual Output Device
Wall Supplies
Waveshare Alphabot 2
Welcome
Wiki Documentation
Wiki Etiquette
Wiki Gardener
Wiki Name
Wiki Plugin
Wiki Tags
Wiki Title
Wiki Wiki
Wire
Wire/wire-gauge.ods
You Tube Channel
Zumo
Zumo Robot

The AND, OR, and NOT logical operators can be combined (using parentheses as necessary) to create more complicated logical queries, e.g.,

    [{HasTagOf (( tagname1 AND tagname2 ) OR ( tagname3 NOT tagname4 ) }]

Regular Expression Matching#

When a compile-time variable "permitRegex" is set true (the default), regular expression ("regex") matching is enabled.

To match on a regular expression, wrap the regex pattern in square brackets. For example, to match any tags beginning with "Per", the regular expression "Per.*" would be used:

  [{HasTagOf [Per.*] }]

Note that a match on any tag is "[.*]", not "[*]". This returns all tagged pages, not the list of all tags.


Alternative Output Formats#

The output without any 'output' parameter will be wrapped in an HTML <div class='hastag'> element that permits CSS styling. If an 'output' parameter is specified this <div> wrapper is not included in the generated output.

Options for the 'output' parameter value are: "none", "count", "list", "bullet", "number", "space", "comma", "colon" and "bar". The default (absent any parameter) is "list".

(NOTE: the below demonstrations will fail if the plugin is not installed.)

None:

    [{HasTagOf output='none' Person }]

Count:

    [{HasTagOf output='count' Person }]

List:

    [{HasTagOf output='list' Person }]

Bullet:

    [{HasTagOf output='bullet' Person }]

Number:

    [{HasTagOf output='number' Person }]

Space:

    [{HasTagOf output='space' Person }]

Comma:

    [{HasTagOf output='comma' Person }]

Colon:

    [{HasTagOf output='colon' Person }]

Vertical Bar:

    [{HasTagOf output='bar' Person }]

Case Testing#

Not quite sure how to handle this since we need to match page names case insensitively but we don't want our tags to all be lowercased.

    [{HasTagOf PERSON }]
    [{HasTagOf person }]
    [{HasTagOf [P.*] }]

The presence of regex characters will force this as a regex match but [p.*] will only match wiki pages beginning with lowercase 'p', not uppercase.

    [{HasTagOf [p.*] }]
No pages.

Doing an explicit regex match using the 'regex' parameter:

    [{HasTagOf regex='(A|P).*' }]
No pages.


This is a page related to the TagManager.

Tags:  Wiki Plugin
Tag Failed:
Tag 'Neocortext Plugin' undefined (page does not exist)