Documentation

Find documentation for our Joomla extensions on this page.

JoomFAQs - The Single Question View (Frontend)

The single question view is the dedicated page that displays one FAQ question along with its full answer, metadata, voting controls, and optional comment functionality. Visitors reach this page by clicking a "Read More" or permalink on a question within a category listing, by following a direct URL to a specific question, or by arriving from a search engine result.

This is the most detailed view of any individual FAQ item. It is where visitors read the full answer, provide feedback via voting, and optionally leave comments explaining why they found the answer unhelpful.


How Visitors Reach This Page

There are several ways a visitor can land on the single question view:

  • Permalink from the category view. When viewing a category of questions in accordion mode, each question may include a "Permalink" link that opens the question on its own page.
  • Direct URL. The question has its own SEF-friendly URL that can be shared, bookmarked, or linked from other pages.
  • Search engine results. Because each question page includes its own page title, meta description, and structured data, search engines can index and link directly to individual questions.
  • Smart Search or Basic Search. If the JoomFAQs finder or search plugin is enabled, search results can link directly to single questions.

Page Anatomy

The single question view is rendered as a Bootstrap 5 accordion with a single item. The accordion is pre-expanded (open by default), so the answer is immediately visible. From top to bottom, the page includes the following elements:

1. Question Title (Accordion Header)

The question text is displayed inside an accordion button element. An icon appears to the left of the question text. This icon is either:

  • The icon assigned to the individual question (if one was set in the admin panel), or
  • The default question icon from the category or global configuration settings.

The accordion header is styled according to the active accordion style (see "Accordion Styling" below).

2. Author and Answerer Information Bar

Directly below the accordion header and above the answer text, an information bar may appear. This bar is a bordered, rounded container that displays metadata about who asked and who answered the question. It only appears when at least one of the relevant display options is enabled.

The information bar can show:

  • Question author -- The name or username of the person who submitted the question, displayed with a user icon. This appears when "Author" is set to Show in the category options.
  • Answer author -- The name or username of the person who answered the question, displayed with a reply icon. This appears when "Answer Created By" is set to Show.
  • Edit button -- If the currently logged-in user has core.edit permission for the question's category, a yellow "Edit" button appears on the right side of the information bar. Clicking it navigates to the frontend question editing form.

Whether the author display shows a person's full name or their login username is controlled by the "Author Display Type" setting at the category level (answer_created_by_type). When set to "Name," the user's full name from their Joomla profile is shown. When set to "Login," their username is shown instead.

3. Answer Content

The full answer is rendered below the information bar. The answer content passes through Joomla's content.prepare processing, which means:

  • Content plugins are triggered on the answer text (for example, load module, page break, or email cloaking plugins will work within answers).
  • Any HTML formatting, images, videos, or embedded content in the answer will render as expected.

4. Custom Fields

If Joomla custom fields have been assigned to the JoomFAQs component and the current question has values for those fields, they are displayed immediately after the answer content.

Custom fields support two layout modes, controlled by the "Custom Fields Layout" setting in the component configuration:

  • Default layout -- Fields are displayed in an unordered list (<ul>) grouped by field group. Each field shows its label (in bold) followed by a colon and the field value. Empty fields are automatically hidden. Field group titles appear as <h4> headings when the group contains at least one non-empty field.

  • Table layout -- Fields are displayed in a two-column HTML table. The left column (with a light background, 25% width) contains the field label, and the right column contains the field value. Group titles span both columns. Empty fields are automatically hidden.

5. Vote Statistics (Editors Only)

If the current user has core.edit permission for the question's category, a summary bar appears showing:

  • The number of "Yes" votes
  • The number of "No" votes
  • The total number of comments

This information is displayed in a yellow alert box and is only visible to editors, not to regular visitors. It helps administrators gauge how helpful the FAQ item is without needing to visit the backend.

6. Voting (Poll) Section

When the "Show Poll" option is enabled (it is enabled by default), a voting section appears. This section asks visitors: "This information was useful?" (displayed in a blue info alert).

Two radio button options are available:

  • Thumbs Up (Yes) -- Clicking the green thumbs-up icon immediately submits a positive vote via AJAX. The vote is recorded without a page reload, and the voting form is replaced by a thank-you message.

  • Thumbs Down (No) -- Clicking the red thumbs-down icon does not immediately submit a vote. Instead, it opens a modal dialog prompting the visitor to explain why the answer was not helpful. The modal contains a comment form (see "Comments" below). After the visitor submits their comment, both the negative vote and the comment are recorded simultaneously.

The voting is handled via JavaScript (joomfaqs.js), which communicates with the server asynchronously. A CSRF token is included with every vote submission for security.

7. Comment Modal

When a visitor clicks the thumbs-down button, a Bootstrap modal dialog appears with the title "Your Message." This modal:

  • Loads the comment form inside an iframe (the comment view with tmpl=component).
  • Has a static backdrop (clicking outside does not close it).
  • Contains two footer buttons: Close (cancels and closes the modal) and Save (submits the comment).
  • After successful submission, the modal closes, the voting form is removed, and a success message appears: "Thank you! Your feedback will help us improve our Help Center."

This design ensures that negative votes always come with an explanation, giving site administrators actionable feedback about their FAQ content.

8. Date Information

At the bottom of the accordion body, date information may appear. This section shows:

  • Question creation date -- When "Date creation" is set to Show, the date the question was originally created appears on the left side with a calendar-check icon. Hovering over it shows a tooltip with the full formatted date.

  • Answer creation date -- When "Date of reply" is set to Show, the date the answer was published appears on the right side with a calendar icon. The same tooltip behavior applies.

Dates are formatted using Joomla's DATE_FORMAT_LC2 format, which respects the site's language and locale settings.

Below the accordion (outside of it), a "Back to questions list" link appears with a left-arrow icon. This link navigates the visitor back to the category that contains the question.

This link is controlled by the global component configuration option "Show Back to Questions" (back_to_quesion). It is enabled by default but can be hidden if you prefer visitors to use breadcrumbs or other navigation instead.


The question view supports a print-friendly layout. When the page is loaded with the tmpl=component query parameter, a simplified print template is rendered instead of the full page. The print view contains only:

  • The question text as an <h1> heading.
  • The answer content (processed through Joomla's content plugins).

All navigation, voting controls, comments, author information, date displays, and styling are removed from the print view, producing a clean output suitable for printing or saving as a PDF.

Note that the print link itself is shown on the category view (not the single question view). From the category page, visitors can print all questions in that category at once.


SEO Metadata

Each single question page includes three layers of SEO-related output, all generated automatically by layout files:

Page Title and Meta Tags

The page title is set to the question text. Depending on the Joomla global configuration for "Page Titles":

  • Before site name: "Site Name - Question Text"
  • After site name: "Question Text - Site Name"
  • No site name: "Question Text" only

If the question has a custom meta description (metadesc field), it is used as the page's meta description. If the question has meta keywords (metakey field), they are added as the page's meta keywords.

The question text is also added to the site's breadcrumb pathway.

FAQ Schema Markup (JSON-LD)

When "Enable FAQ Schema" is set to Yes in the component's SEO configuration (it is enabled by default), a JSON-LD structured data block is injected into the page's <head>. This markup follows the Schema.org FAQPage format:

{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "The question text",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The answer text (HTML stripped)"
      }
    }
  ]
}

This structured data helps search engines understand the content as an FAQ and may enable rich result displays (FAQ rich snippets) in search results.

Open Graph Tags

When "Enable Open Graph" is set to Yes (enabled by default), Open Graph meta tags are added to the page head for improved social media sharing on Facebook, LinkedIn, and similar platforms:

  • og:type -- Set to "article"
  • og:url -- The current page URL
  • og:title -- The page title
  • og:description -- The meta description, or a generated summary from the question and answer text (truncated to 200 characters)
  • og:site_name -- Your Joomla site name
  • og:image -- The question's image if one is assigned, otherwise the site template's logo
  • og:locale -- The current language tag
  • fb:app_id -- Your Facebook App ID, if configured

Twitter Card Tags

When "Enable Twitter Card" is set to Yes (enabled by default), Twitter Card meta tags are added:

  • twitter:card -- Set to "summary_large_image" for a visually prominent card
  • twitter:title -- The page title
  • twitter:description -- The meta description or generated summary (truncated to 200 characters)
  • twitter:image -- The question's image or the site logo
  • twitter:site -- Your Twitter site handle, if configured
  • twitter:creator -- Your Twitter creator handle, if configured

Accordion Styling on the Question Page

The single question view uses the same accordion styling system as the category view. The active accordion style (set globally or at the category level) is applied to the question's accordion container. This means the question page visually matches the style of the category it belongs to.

Available accordion styles include: Default, Minimal, Modern, Corporate, Gradient, Material, Glass, Glassmorphism, Neumorphism, Dark, Outline, Shadow, Flat, and Custom. See the component configuration guide for full details on each style and its color customization options.


Configuration Options That Affect This View

The following settings control what appears on the single question page. Most of these are set at the category level (in the category's options tab) but inherit from the global component configuration when not overridden.

Category-Level "Questions Options" Tab

SettingEffect on Question ViewDefault
Icon Sets the default icon shown next to the question title in the accordion header. Individual questions can override this. (inherited from global)
Author (show_created_by) Shows or hides the question author's name in the information bar. Show
Date creation (show_created_date) Shows or hides the question creation date at the bottom of the answer. Show
Answer Created By (show_answer_created_by) Shows or hides the answerer's name in the information bar. Show
Date of reply (show_answer_created_date) Shows or hides the answer creation date at the bottom of the answer. Show
Author Display Type (answer_created_by_type) Controls whether to display user's login name or full name for the answer author. Login
Show Poll (show_poll) Shows or hides the voting section ("This information was useful?"). Show
Content Plugins (content_plugins) Whether to process Joomla content plugins in the answer text. No

Global Component Configuration

SettingEffect on Question ViewDefault
Custom Fields Layout (customfield_layout) Controls whether custom fields appear in Default (list) or Table layout. Default
Show Back to Questions (back_to_quesion) Shows or hides the "Back to questions list" link below the accordion. Show
Enable FAQ Schema (enable_faq_schema) Adds FAQ structured data (JSON-LD) to the page head. Yes
Enable Twitter Card (enable_twitter_card) Adds Twitter Card meta tags for social sharing. Yes
Twitter Site (twitter_site) Your site's Twitter handle for Twitter Cards. (empty)
Twitter Creator (twitter_creator) The content creator's Twitter handle. (empty)
Enable Open Graph (enable_open_graph) Adds Open Graph meta tags for social sharing. Yes
Facebook App ID (facebook_app_id) Your Facebook App ID for Open Graph integration. (empty)
Captcha (captcha) Captcha plugin to use for comment forms. Use Global
Accordion Style Controls the visual style of the accordion on the question page. Default

Parameter Merging

The question view merges parameters from multiple levels. Category-level settings override global component settings. This means you can have different display configurations per category -- for example, showing the poll in one category but hiding it in another, or using different accordion styles per category.


Access Control

The question view enforces two layers of access control before displaying content:

  1. Question-level access -- The question's own access level is checked against the current user's authorized view levels. If the user does not have access, an "Not authorized" error message is shown.

  2. Category-level access -- The parent category's access level is also checked. Even if a user has access to the question itself, they must also have access to the category that contains it.

If either check fails, the page displays a Joomla authorization error instead of the question content.

Users with core.edit permission on the question's category see additional features:

  • The Edit button in the information bar
  • Vote and comment statistics (yes votes, no votes, comment count)

Plugin Events

The question view triggers two custom plugin events that third-party extensions can listen for:

  • onJoomfaqsBeforeDisplay -- Fired immediately before the question template is rendered. Plugins can inject content above the question accordion.
  • onJoomfaqsAfterDisplay -- Fired immediately after the question template is rendered. Plugins can inject content below the question accordion.

Both events receive the context string com_joomfaqs.question, the question item object, and the merged parameters.

Additionally, the standard Joomla onContentPrepare event is triggered on the question item, allowing content plugins to process the question data before display.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok