Custom Template Tags Reference¶
Version: Arctyk ITSM v0.6.0+
Last Updated: January 2026
Documentation for custom Django template tags and filters.
Tags¶
{% active_link %}¶
Library: core_tags
Purpose: Highlights active navigation links
Usage:
Parameters:
url_name- Name of the URL to check against current path
Returns: class="active" if URL matches current path
{% status_badge %}¶
Library: ticket_tags
Purpose: Renders status badge with appropriate color
Usage:
Output: <span class="badge badge-primary">Open</span>
{% priority_icon %}¶
Library: ticket_tags
Purpose: Renders priority icon
Usage:
{% comment_type_badge %} (v0.6.0+)¶
Library: ticket_tags
Purpose: Renders comment type badge (public/internal)
Usage:
Output: <span class="badge badge-warning">Internal</span>
Filters¶
|markdown¶
Library: core_tags
Purpose: Converts markdown to HTML
Usage:
|truncate_chars_html¶
Library: core_tags
Purpose: Truncates HTML content safely
Usage:
|status_class¶
Library: ticket_tags
Purpose: Returns CSS class for status
Usage:
Returns: badge-success, badge-primary, badge-warning, etc.
|priority_class¶
Library: ticket_tags
Purpose: Returns CSS class for priority
Usage:
{% load ticket_tags %}
<span class="{{ ticket.priority|priority_class }}">{{ ticket.priority }}</span>
|time_ago¶
Library: core_tags
Purpose: Converts datetime to relative time (e.g., "2 hours ago")
Usage:
|format_duration (v0.6.0+)¶
Library: ticket_tags
Purpose: Formats timedelta for SLA display
Usage:
Output: "2h 30m" or "3d 5h"