No Code Attached Yet
avatar uzielweb
uzielweb
30 Oct 2025

Summary

This suggestion addresses an issue in the Joomla Tags component (com_tags) to enhance template customization:

  • Missing tag_columns Parameter in Singular Tag View: The tag_columns parameter is not available in the singular tag view template (components/com_tags/tmpl/tag/list.xml), preventing users from selecting custom layouts (e.g., grid vs. list) in this context.

This change would improve flexibility for themers and site admins, ensuring consistency across views.

Detailed Description

Add tag_columns to Singular Tag View Template

Current Behavior

  • The tag_columns parameter controls layout rendering (e.g., number of columns for grid display) but is only defined in the default list view template (components/com_tags/tmpl/default/list.xml).
  • In the singular tag view (components/com_tags/tmpl/tag/list.xml), this parameter is absent, forcing a fixed layout and limiting customization.

Expected Behavior

  • Add <field name="tag_columns" ... /> to components/com_tags/tmpl/tag/list.xml to mirror the default view.
  • Default value: 1 (single column) or match the global params.
  • This allows menu item or module overrides for layouts like multi-column grids in tag-specific pages.

Reproduction Steps

  1. Create a menu item for a single tag (Tags > Single Tag).
  2. In the menu item's template options, attempt to set "Tag Columns" – the field is missing.
  3. Result: Layout cannot be customized, defaulting to a single-column list.

Impact

  • Reduced flexibility for themers and site admins
  • Inconsistent parameter availability across views

Proposed Implementation

<!-- Add to components/com_tags/tmpl/tag/list.xml -->
<field
    name="tag_columns"
    type="number"
    label="COM_TAGS_TAG_COLUMNS_LABEL"
    description="COM_TAGS_TAG_COLUMNS_DESC"
    default="1"
    min="1"
    max="12"
    filter="integer"
/>

Update the view's display() method in components/com_tags/views/tag/view.html.php to read and apply $this->params->get('tag_columns', 1) in the template loop.
Ensure backward compatibility by falling back to the default view's logic if needed.

Additional Context

  • Joomla Version: Tested on Joomla 5.x (but likely affects 6.x as well)
  • Environment: Apache 2.4+ with mod_rewrite enabled; PHP 8.4+
  • Related Issues/PRs:
    • Template param expansions: [General discussion on layout params]
  • Priority: Medium (improves core usability without breaking changes)
avatar uzielweb uzielweb - open - 30 Oct 2025
avatar joomla-cms-bot joomla-cms-bot - change - 30 Oct 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Oct 2025

Add a Comment

Login with GitHub to post a comment