Skip to content

WinterCMS (multilingual) Frequently Asked Questions, with categories, featured statusses, search functionality and language filter

Notifications You must be signed in to change notification settings

AIC-BV/wn-faq-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FAQ plugin

Create Frequently Asked Questions with ease! These can be translated if you are using Winter.Translate.

Note that if you are NOT using Winter.Translate, everything will work exactly the same but the 'Translated FAQs only' checkbox will be useless and there will be no translation support.

Note:

Images

FAQ list

FAQ edit

Features

With the FAQ plugin, you can:

  • Create and update your FAQ
  • Create and update categories for your FAQ
  • Assign categories to your FAQ
  • Define questions and answers in your FAQ
  • Control which FAQs are published
    • Published
    • In progress (allows logged in backend users to see them on the frontend)
    • Hidden
  • Add a featured status to FAQ
    • Featured
    • Not featured
  • Choose the sorting method between predefined choices
    • Category (ascending and descending)
    • Created at (ascending and descending)
  • Choose which categories you wish to display
    • Your own created category
    • Your own other created category
    • Your own other other created category
    • ...
    • All
  • Choose which FAQs type you wish to display
    • Featured
    • Not featured
    • All
  • Enable a search field, allowing users to quickly find FAQs
  • Define the minimum amount of records that are required for displaying the search field
  • Make sure that only FAQs in the correct language are shown
    • for example: if FAQ #1 is NOT translated in Spanish, it won't show when the user's locale is Spanish
    • for example: if FAQ #2 is translated in Spanish and English, it will show in both Spanish and English, but not in French.
  • The default markup makes use of HTML5 details & summary
    • This adds default behaviour for opening and closing FAQs
  • Translate FAQs

Default behaviour:

  • Automatically displays all FAQ catagories
  • Automatically displays all FAQs regardless of their featured status
  • Automatically adds a search box if there are more than 10 FAQs in total
    • You can change this on the component itself by changing 'Search minimum results'.
    • Not shown if 'Search enabled' is unchecked
  • Automatically hides FAQs that are not translated in the current website langauge
    • You can change this on the component itself by unchecking 'Translated FAQs only'.

Installation

You can (soon) install this plugin for free using WinterCMS Marketplace or (now) using composer (composer require aic/wn-faq-plugin and php artisan winter:up). You can then go to 'CMS -> Components' to drag and drop FAQ in to your page/layout. Clicking the FAQ component gives you the options to modify the default behaviour.

FAQ variables

In the component itself you can use the following variables (note that you should prepend them with {{ __SELF__ }} if you have multiple FAQ components on one page):

  • items (array of items)
    • name (= category name)
    • faqs (array of faqs)
      • id
      • category_id
      • is_published
      • is_featured
      • question
      • answer
      • created_at
      • updated_at
  • isSearch (if true, searchbox is enabled)
  • searchLabel (label for the search field)
  • searchPlaceholder (placeholder for the search field)
  • minSearchResults (the minimum amount of results required for displaying the searchbox)
  • searchQuery (the querystring user used in the search box)

Let me know what you think

I spent a lot of time making this plugin public for the community. All I ask in return is that you let me know that you are using my plugin. I'm sure you all understand that it is very nice for me to know if my plugin is being used or not (might make more in the future if people actually use my plugins).

You can do so by sending me a simple message on Discord (Makalele#4465) or an e-mail to [email protected]. It doesn't have to be much, a thank you is all I ask for :)

Special thanks

Special thanks to the WinterCMS maintainer team for making this possible:

About

WinterCMS (multilingual) Frequently Asked Questions, with categories, featured statusses, search functionality and language filter

Resources

Stars

Watchers

Forks

Packages

No packages published